------------------------------------------------------------------------------- log: C:\~SLJF\makeverifyfiles\spostverify\done\prvalueverify.log log type: text opened on: 25 Mar 2001, 14:21:31 . * prvalue: version 1.8.5 . * verified: 3/24/01 . which prvalue c:\stata\ado\stbplus\p\prvalue.ado *! version 1.8.5 3/25/2001 - spacing in zip/zinb . . use gsstestdata.dta, clear . ** CHECK VALUES OF LOGIT AGAINST VALUES GENERATED BY PREDICT . . *compare to values of 10th observation (arbitrarily chosen) . qui logit feminist age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) logit: Predictions for feminist Pr(y=Yes|x): 0.4783 95% ci: (0.3967,0.5611) Pr(y=No|x): 0.5217 95% ci: (0.4389,0.6033) age educ lesbian liberal x= 53 16 0 5 . ** check against p(1) = .47830224 . . qui probit feminist age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) probit: Predictions for feminist Pr(y=Yes|x): 0.4689 95% ci: (0.3898,0.5493) Pr(y=No|x): 0.5311 95% ci: (0.4507,0.6102) age educ lesbian liberal x= 53 16 0 5 . ** check against p(1) = .46891975 . . qui cloglog feminist age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) cloglog: Predictions for feminist Pr(y=Yes|x): 0.4950 95% ci: (0.4094,0.5878) Pr(y=No|x): 0.5050 95% ci: (0.4122,0.5906) age educ lesbian liberal x= 53 16 0 5 . ** check against p(1) = .49501412 . . qui ologit mchilds age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) ologit: Predictions for mchilds Pr(y=no_child|x): 0.2411 Pr(y=one_chil|x): 0.2169 Pr(y=two_chil|x): 0.3103 Pr(y=three_ch|x): 0.2318 age educ lesbian liberal x= 53 16 0 5 . ** check against p(y=1) = .2168871 . . qui oprobit mchilds age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) oprobit: Predictions for mchilds Pr(y=no_child|x): 0.2571 Pr(y=one_chil|x): 0.2142 Pr(y=two_chil|x): 0.3005 Pr(y=three_ch|x): 0.2283 age educ lesbian liberal x= 53 16 0 5 . ** check against p(y=1) = .21415542 . . qui mlogit mchilds age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) mlogit: Predictions for mchilds Predicted probabilities for each category: Pr(y=no_child|x): 0.2475 Pr(y=one_chil|x): 0.1797 Pr(y=two_chil|x): 0.3425 Pr(y=three_ch|x): 0.2303 age educ lesbian liberal x= 53 16 0 5 . ** check against p(y=1) = .17974102 . . qui poisson ctchilds age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) poisson: Predictions for ctchilds Predicted rate: 1.5686 95% CI [1.4425 , 1.7056] Predicted probabilities: Pr(y=0|x): 0.2083 Pr(y=1|x): 0.3268 Pr(y=2|x): 0.2563 Pr(y=3|x): 0.1340 Pr(y=4|x): 0.0526 Pr(y=5|x): 0.0165 Pr(y=6|x): 0.0043 Pr(y=7|x): 0.0010 Pr(y=8|x): 0.0002 Pr(y=9|x): 0.0000 age educ lesbian liberal x= 53 16 0 5 . ** check against p(rate) = 1.5685786 . ** check against p(y=0) = .208 (calculated using XPost) . ** check against p(y=1) = .327 (calculated using XPost) . . qui nbreg ctchilds age educ lesbian liberal . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) nbreg: Predictions for ctchilds Predicted rate: 1.5679 Predicted probabilities: Pr(y=0|x): 0.2176 Pr(y=1|x): 0.3229 Pr(y=2|x): 0.2482 Pr(y=3|x): 0.1316 Pr(y=4|x): 0.0541 Pr(y=5|x): 0.0184 Pr(y=6|x): 0.0054 Pr(y=7|x): 0.0014 Pr(y=8|x): 0.0003 Pr(y=9|x): 0.0001 age educ lesbian liberal x= 53 16 0 5 . ** check against p(rate) = 1.5679215 . ** check against p(y=0) = .218 (calculated using XPost) . ** check against p(y=1) = .323 (calculated using XPost) . . qui zip zchilds age educ lesbian liberal, inf(age educ lesbian liberal) . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) zip: Predictions for zchilds Predicted rate: .3522 Predicted probabilities: Pr(y=0|x,z): 0.8896 Pr(y=1|x): 0.0921 Pr(y=2|x): 0.0162 Pr(y=3|x): 0.0019 Pr(y=4|x): 0.0002 Pr(y=5|x): 0.0000 Pr(y=6|x): 0.0000 Pr(y=7|x): 0.0000 Pr(y=8|x): 0.0000 Pr(y=9|x): 0.0000 Pr(Always0|z): 0.6281 x values for count equation age educ lesbian liberal x= 53 16 0 5 z values for binary equation age educ lesbian liberal z= 53 16 0 5 . ** check against p(always0) = .62808502 . ** check against p(rate) = .35220292 . . qui zinb zchilds age educ lesbian liberal, inf(age educ lesbian liberal) . prvalue, x(age 53 educ 16 lesbian 0 liberal 5) zinb: Predictions for zchilds Predicted rate: .47902 Predicted probabilities: Pr(y=0|x,z): 0.7170 Pr(y=1|x): 0.1923 Pr(y=2|x): 0.0618 Pr(y=3|x): 0.0197 Pr(y=4|x): 0.0063 Pr(y=5|x): 0.0020 Pr(y=6|x): 0.0006 Pr(y=7|x): 0.0002 Pr(y=8|x): 0.0001 Pr(y=9|x): 0.0000 Pr(Always0|z): 0.1319 x values for count equation age educ lesbian liberal x= 53 16 0 5 z values for binary equation age educ lesbian liberal z= 53 16 0 5 . ** check against p(always0) = .13187279 . ** check against p(rate) = .4790189 . . use nels_censored2, clear (nels_censored.dta after compress.) . qui tobit tobiscor bymomed bydaded black hispanic, ul(125) ll(75) . prvalue, x(bymomed 3 bydaded 4 black 0 hispanic 0) tobit: Predictions for tobiscor Predicted value of y*: 106.7287 95% ci: ( 106.1912, 107.2663) bymomed bydaded black hispanic x= 3 4 0 0 . ** check against y* = 106.72874 . . qui cnreg testscor bymomed bydaded black hispanic, censored(censor) . prvalue, x(bymomed 3 bydad 4 black 0 hispanic 0) cnreg: Predictions for testscor Predicted value of y*: 106.4517 95% ci: ( 105.8976, 107.0059) bymomed bydaded black hispanic x= 3 4 0 0 . capture drop checkvar . qui predict checkvar in 12 . di checkvar[12] 106.45174 . ** check against y* = 106.45174 . . qui reg realscor bymomed bydaded black hispanic . prvalue, x(bymomed 3 bydad 4 black 0 hispanic 0) regress: Predictions for realscor Predicted value of y: 106.4006 95% ci: ( 105.9117, 106.8895) bymomed bydaded black hispanic x= 3 4 0 0 . capture drop checkvar . qui predict checkvar in 12 . di checkvar[12] 106.40057 . ** check against y = 106.40057 . . qui intreg minscor maxscor bymomed bydaded black hispanic . prvalue, x(bymomed 3 bydad 4 black 0 hispanic 0) intreg: Predictions for minscor maxscor Predicted value of y*: 106.4555 95% ci: ( 105.9502, 106.9608) bymomed bydaded black hispanic x= 3 4 0 0 . capture drop checkvar . qui predict checkvar in 12 . di checkvar[12] 106.45552 . ** check against y = 106.45552 . . ** OTHER PERMUTATIONS OF PRVALUE TO CHECK THAT IT DOESN'T CRASH . . use gsstestdata.dta, clear . . *logit and logistic . qui logit feminist age educ lesbian liberal . prvalue, x(age 40 educ 12) save logit: Predictions for feminist Pr(y=Yes|x): 0.2560 95% ci: (0.2188,0.2972) Pr(y=No|x): 0.7440 95% ci: (0.7028,0.7812) age educ lesbian liberal x= 40 12 .02452316 2.9019074 . qui logit feminist age educ lesbian liberal faminc . prvalue, x(age 40 educ 12) dif logit: Change in Predictions for feminist Current Saved Difference Pr(y=Yes|x): 0.2551 0.2560 -0.0009 Pr(y=No|x): 0.7449 0.7440 0.0009 age educ lesbian liberal faminc Current= 40 12 .02556818 2.921875 35.45348 age educ lesbian liberal Saved= 40 12 .02452316 2.9019074 . qui logistic feminist age educ lesbian liberal . prvalue, x(age 40 educ 12) save logistic: Predictions for feminist Pr(y=Yes|x): 0.2560 95% ci: (0.2188,0.2972) Pr(y=No|x): 0.7440 95% ci: (0.7028,0.7812) age educ lesbian liberal x= 40 12 .02452316 2.9019074 . qui logistic feminist age educ lesbian liberal faminc . prvalue, x(age 40 educ 12) dif logistic: Change in Predictions for feminist Current Saved Difference Pr(y=Yes|x): 0.2551 0.2560 -0.0009 Pr(y=No|x): 0.7449 0.7440 0.0009 age educ lesbian liberal faminc Current= 40 12 .02556818 2.921875 35.45348 age educ lesbian liberal Saved= 40 12 .02452316 2.9019074 . . *probit . qui probit feminist age educ lesbian liberal . prvalue, x(age 40 educ max) rest(median) save probit: Predictions for feminist Pr(y=Yes|x): 0.3680 95% ci: (0.2802,0.4634) Pr(y=No|x): 0.6320 95% ci: (0.5366,0.7198) age educ lesbian liberal x= 40 20 0 3 . qui probit feminist age educ lesbian liberal . prvalue, x(age 40 educ max) rest(mean) dif probit: Change in Predictions for feminist Current Saved Difference Pr(y=Yes|x): 0.3621 0.3680 -0.0059 Pr(y=No|x): 0.6379 0.6320 0.0059 age educ lesbian liberal Current= 40 20 .02452316 2.9019074 Saved= 40 20 0 3 Diff= 0 0 .02452316 -.09809264 . . *cloglog . qui cloglog feminist age educ lesbian liberal . prvalue, rest(upper) save cloglog: Predictions for feminist Pr(y=Yes|x): 0.7791 95% ci: (0.4275,0.9832) Pr(y=No|x): 0.2209 95% ci: (0.0168,0.5725) age educ lesbian liberal x= 89 20 1 6 . qui cloglog feminist age educ lesbian liberal . prvalue, rest(lower) dif cloglog: Change in Predictions for feminist Current Saved Difference Pr(y=Yes|x): 0.0576 0.7791 -0.7215 Pr(y=No|x): 0.9424 0.2209 0.7215 age educ lesbian liberal Current= 18 0 0 0 Saved= 89 20 1 6 Diff= -71 -20 -1 -6 . . *ologit . qui ologit mchilds age educ lesbian liberal . prvalue, x(age max educ min) save ologit: Predictions for mchilds Pr(y=no_child|x): 0.0065 Pr(y=one_chil|x): 0.0106 Pr(y=two_chil|x): 0.0468 Pr(y=three_ch|x): 0.9362 age educ lesbian liberal x= 89 0 .02450331 2.8768212 . qui ologit mchilds age educ lesbian liberal faminc . prvalue, x(age max educ min) dif ologit: Change in Predictions for mchilds Current Saved Difference Pr(y=no_child|x): 0.0036 0.0065 -0.0029 Pr(y=one_chil|x): 0.0063 0.0106 -0.0043 Pr(y=two_chil|x): 0.0301 0.0468 -0.0167 Pr(y=three_ch|x): 0.9600 0.9362 0.0239 age educ lesbian liberal faminc Current= 89 0 .0252809 2.883427 35.129038 age educ lesbian liberal Saved= 89 0 .02450331 2.8768212 . . *oprobit . qui oprobit mchilds age educ lesbian liberal . prvalue, x(age mean educ 12) rest(upper) save oprobit: Predictions for mchilds Pr(y=no_child|x): 0.1315 Pr(y=one_chil|x): 0.1634 Pr(y=two_chil|x): 0.3144 Pr(y=three_ch|x): 0.3906 age educ lesbian liberal x= 45.007947 12 0 0 . qui oprobit mchilds age educ lesbian liberal faminc . prvalue, x(age mean educ 12) rest(upper) dif oprobit: Change in Predictions for mchilds Current Saved Difference Pr(y=no_child|x): 0.0677 0.1315 -0.0638 Pr(y=one_chil|x): 0.1183 0.1634 -0.0451 Pr(y=two_chil|x): 0.2965 0.3144 -0.0179 Pr(y=three_ch|x): 0.5175 0.3906 0.1268 age educ lesbian liberal faminc Current= 44.544242 12 0 0 90 age educ lesbian liberal Saved= 45.007947 12 0 0 . . *mlogit . qui mlogit mchilds age educ lesbian liberal . prvalue, x(age 40 educ 12) save mlogit: Predictions for mchilds Predicted probabilities for each category: Pr(y=no_child|x): 0.1949 Pr(y=one_chil|x): 0.2174 Pr(y=two_chil|x): 0.2951 Pr(y=three_ch|x): 0.2927 age educ lesbian liberal x= 40 12 .02450331 2.8768212 . qui mlogit mchilds age educ lesbian liberal faminc . prvalue, x(age 40 educ 12 liberal 5) dif mlogit: Change in Predictions for mchilds Predicted probabilities for each category: Current Saved Difference Pr(y=no_child|x): 0.2090 0.1949 0.0142 Pr(y=one_chil|x): 0.2369 0.2174 0.0195 Pr(y=two_chil|x): 0.3130 0.2951 0.0179 Pr(y=three_ch|x): 0.2411 0.2927 -0.0516 age educ lesbian liberal faminc Current= 40 12 .0252809 5 35.129038 age educ lesbian liberal Saved= 40 12 .02450331 2.8768212 . . *poisson . qui poisson ctchilds age educ lesbian liberal . prvalue, x(age 40 educ 12 liberal 4) save maxcnt(7) poisson: Predictions for ctchilds Predicted rate: 1.7006 95% CI [1.6087 , 1.7978] Predicted probabilities: Pr(y=0|x): 0.1826 Pr(y=1|x): 0.3105 Pr(y=2|x): 0.2640 Pr(y=3|x): 0.1497 Pr(y=4|x): 0.0636 Pr(y=5|x): 0.0216 Pr(y=6|x): 0.0061 Pr(y=7|x): 0.0015 age educ lesbian liberal x= 40 12 .02450331 4 . qui poisson ctchilds age educ lesbian liberal feminist . prvalue, x(age 40 educ 12 liberal 2) dif maxcnt(7) poisson: Change in Predictions for ctchilds Predicted rate: 1.8541 95% CI [1.7202 , 1.9983] Saved: 1.7006 Difference: .15343 Predicted probabilities: Current Saved Difference Pr(y=0|x): 0.1566 0.1826 -0.0260 Pr(y=1|x): 0.2903 0.3105 -0.0201 Pr(y=2|x): 0.2692 0.2640 0.0052 Pr(y=3|x): 0.1663 0.1497 0.0167 Pr(y=4|x): 0.0771 0.0636 0.0135 Pr(y=5|x): 0.0286 0.0216 0.0069 Pr(y=6|x): 0.0088 0.0061 0.0027 Pr(y=7|x): 0.0023 0.0015 0.0008 age educ lesbian liberal feminist Current= 40 12 .02465753 2 .29452055 age educ lesbian liberal Saved= 40 12 .02450331 4 . . *nbreg . qui nbreg ctchilds age educ lesbian liberal . prvalue, x(age 40 educ 12 liberal 3) save nbreg: Predictions for ctchilds Predicted rate: 1.7806 Predicted probabilities: Pr(y=0|x): 0.1781 Pr(y=1|x): 0.2979 Pr(y=2|x): 0.2581 Pr(y=3|x): 0.1544 Pr(y=4|x): 0.0716 Pr(y=5|x): 0.0274 Pr(y=6|x): 0.0090 Pr(y=7|x): 0.0026 Pr(y=8|x): 0.0007 Pr(y=9|x): 0.0002 age educ lesbian liberal x= 40 12 .02450331 3 . qui nbreg ctchilds age educ lesbian liberal feminist . prvalue, x(age 40 educ 12 liberal 7) dif nbreg: Change in Predictions for ctchilds Predicted rate: 1.4682 Saved: 1.7806 Difference: -.31238 Predicted probabilities: Current Saved Difference Pr(y=0|x): 0.2403 0.1781 0.0622 Pr(y=1|x): 0.3328 0.2979 0.0350 Pr(y=2|x): 0.2399 0.2581 -0.0182 Pr(y=3|x): 0.1198 0.1544 -0.0345 Pr(y=4|x): 0.0466 0.0716 -0.0250 Pr(y=5|x): 0.0150 0.0274 -0.0124 Pr(y=6|x): 0.0042 0.0090 -0.0049 Pr(y=7|x): 0.0010 0.0026 -0.0016 Pr(y=8|x): 0.0002 0.0007 -0.0005 Pr(y=9|x): 0.0000 0.0002 -0.0001 age educ lesbian liberal feminist Current= 40 12 .02465753 7 .29452055 age educ lesbian liberal Saved= 40 12 .02450331 3 . . *zip . qui zip zchilds age educ lesbian liberal, inf(age faminc liberal) . prvalue, x(age 40 educ median faminc 45) save zip: Predictions for zchilds Predicted rate: .43546 Predicted probabilities: Pr(y=0|x,z): 0.8742 Pr(y=1|x): 0.1004 Pr(y=2|x): 0.0219 Pr(y=3|x): 0.0032 Pr(y=4|x): 0.0003 Pr(y=5|x): 0.0000 Pr(y=6|x): 0.0000 Pr(y=7|x): 0.0000 Pr(y=8|x): 0.0000 Pr(y=9|x): 0.0000 Pr(Always0|z): 0.6437 x values for count equation age educ lesbian liberal x= 40 13 .0252809 2.883427 z values for binary equation age faminc liberal z= 40 45 2.883427 . qui zip zchilds age educ lesbian liberal, inf(age educ faminc) . prvalue, x(age max educ 12 faminc mean) dif zip: Change in Predictions for zchilds Predicted rate: 1.4889 Saved: .43546 Difference: 1.0534 Predicted probabilities: Current Saved Difference Pr(y=0|x,z): 0.3834 0.8742 -0.4908 Pr(y=1|x): 0.2675 0.1004 0.1671 Pr(y=2|x): 0.1991 0.0219 0.1773 Pr(y=3|x): 0.0988 0.0032 0.0957 Pr(y=4|x): 0.0368 0.0003 0.0364 Pr(y=5|x): 0.0110 0.0000 0.0109 Pr(y=6|x): 0.0027 0.0000 0.0027 Pr(y=7|x): 0.0006 0.0000 0.0006 Pr(y=8|x): 0.0001 0.0000 0.0001 Pr(y=9|x): 0.0000 0.0000 0.0000 Pr(Always0|z): 0.2037 0.6437 -0.4400 x values for count equation age educ lesbian liberal Current= 89 12 .0252809 2.883427 Saved= 40 13 .0252809 2.883427 Diff= 49 -1 0 0 z values for binary equation age educ faminc Current= 89 12 .0252809 age faminc liberal Saved= 40 45 2.883427 . . *zinb . qui zinb zchilds age educ lesbian liberal, inf(age educ faminc) . prvalue, x(age 40 educ 12 faminc 45) save zinb: Predictions for zchilds Predicted rate: .668 Predicted probabilities: Pr(y=0|x,z): 0.6718 Pr(y=1|x): 0.1968 Pr(y=2|x): 0.0788 Pr(y=3|x): 0.0315 Pr(y=4|x): 0.0126 Pr(y=5|x): 0.0050 Pr(y=6|x): 0.0020 Pr(y=7|x): 0.0008 Pr(y=8|x): 0.0003 Pr(y=9|x): 0.0001 Pr(Always0|z): 0.1809 x values for count equation age educ lesbian liberal x= 40 12 .0252809 2.883427 z values for binary equation age educ faminc z= 40 12 45 . prvalue, x(age 40 educ 12 faminc 60) dif zinb: Change in Predictions for zchilds Predicted rate: .67214 Saved: .668 Difference: .00414 Predicted probabilities: Current Saved Difference Pr(y=0|x,z): 0.6686 0.6718 -0.0033 Pr(y=1|x): 0.1983 0.1968 0.0015 Pr(y=2|x): 0.0797 0.0788 0.0009 Pr(y=3|x): 0.0320 0.0315 0.0005 Pr(y=4|x): 0.0129 0.0126 0.0002 Pr(y=5|x): 0.0052 0.0050 0.0001 Pr(y=6|x): 0.0021 0.0020 0.0001 Pr(y=7|x): 0.0008 0.0008 0.0000 Pr(y=8|x): 0.0003 0.0003 0.0000 Pr(y=9|x): 0.0001 0.0001 0.0000 Pr(Always0|z): 0.1758 0.1809 -0.0051 x values for count equation age educ lesbian liberal Current= 40 12 .0252809 2.883427 Saved= 40 12 .0252809 2.883427 Diff= 0 0 0 0 z values for binary equation age educ faminc Current= 40 12 60 Saved= 40 12 45 Diff= 0 0 15 . . use nels_censored2, clear (nels_censored.dta after compress.) . . *tobit . qui tobit tobiscor bymomed bydaded byincome black hispanic pctlunch, ul(125) > ll(75) . prvalue, x(bymomed 3 black 1) rest(grmedian) save tobit: Predictions for tobiscor Predicted value of y*: 90.84033 95% ci: ( 89.40199, 92.27868) bymomed bydaded byincome black hispanic pctlunch x= 3 3 22.5 1 0 40 . prvalue, x(bymomed 3 black 0) rest(grmedian) dif tobit: Change in Predictions for tobiscor Predicted value of y*: 103.7364 95% ci: ( 103.1551, 104.3176) Saved value of y*: 90.84033 Difference: 12.89605 bymomed bydaded byincome black hispanic pctlunch Current= 3 3 30 0 0 15 Saved= 3 3 22.5 1 0 40 Diff= 0 0 7.5 -1 0 -25 . . *cnreg . qui cnreg testscor bymomed bydaded byincome black hispanic pctlunch, censored > (censor) . prvalue, x(bymomed 3 black 1) save cnreg: Predictions for testscor Predicted value of y*: 92.75874 95% ci: ( 91.15595, 94.36153) bymomed bydaded byincome black hispanic pctlunch x= 3 3.355953 44.043661 1 .1067859 21.906716 . qui cnreg testscor bymomed bydaded byincome black hispanic pctlunch, censored > (censor) . prvalue, x(bymomed 3 black 1 hispanic 1) rest(min) dif cnreg: Change in Predictions for testscor Predicted value of y*: 81.21251 95% ci: ( 78.59473, 83.83028) Saved value of y*: 92.75874 Difference: -11.54623 bymomed bydaded byincome black hispanic Current= 3 1 0 1 1 Saved= 3 3.355953 44.043661 1 .1067859 Diff= 0 -2.355953 -44.043661 0 .8932141 pctlunch Current= 0 Saved= 21.906716 Diff= -21.906716 . . *intreg . qui intreg minscor maxscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(max) save intreg: Predictions for minscor maxscor Predicted value of y*: 99.27156 95% ci: ( 95.84524, 102.6979) bymomed bydaded byincome black hispanic pctlunch x= 3 7 200 1 1 87.5 . qui intreg minscor maxscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(min) dif intreg: Change in Predictions for minscor maxscor Predicted value of y*: 88.80298 95% ci: ( 87.01354, 90.59241) Saved value of y*: 99.27156 Difference: -10.46858 bymomed bydaded byincome black hispanic pctlunch Current= 3 1 0 1 0 0 Saved= 3 7 200 1 1 87.5 Diff= 0 -6 -200 0 -1 -87.5 . . *regress . qui regress realscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(grmean) save regress: Predictions for realscor Predicted value of y: 92.33727 95% ci: ( 91.00945, 93.6651) bymomed bydaded byincome black hispanic pctlunch x= 3 3.0142857 25.110714 1 0 35.542857 . qui regress realscor bymomed bydaded byincome black hispanic pctlunch pctmino > r . prvalue, x(bymomed 3 black 1) rest(grmean) dif regress: Change in Predictions for realscor Predicted value of y: 92.29177 95% ci: ( 90.96018, 93.62336) Saved value of yHat: 92.33727 Difference: -.0455017 bymomed bydaded byincome black hispanic pctlunch Current= 3 3.0144928 25.039855 1 0 36.057971 pctminor Current= 58.217391 bymomed bydaded byincome black hispanic pctlunch Saved= 3 3.0142857 25.110714 1 0 35.542857 . . * CHECK THAT BRIEF COMMAND WORKS . . use gsstestdata.dta, clear . . qui logit feminist age educ lesbian liberal . prvalue, x(age 40 educ 12) brief save Pr(y=Yes|x): 0.2560 95% ci: (0.2188,0.2972) Pr(y=No|x): 0.7440 95% ci: (0.7028,0.7812) . qui logit feminist age educ lesbian liberal faminc . prvalue, x(age 40 educ 12) brief dif Current Saved Difference Pr(y=Yes|x): 0.2551 0.2560 -0.0009 Pr(y=No|x): 0.7449 0.7440 0.0009 . qui ologit mchilds age educ lesbian liberal . prvalue, x(age max educ min) brief save Pr(y=no_child|x): 0.0065 Pr(y=one_chil|x): 0.0106 Pr(y=two_chil|x): 0.0468 Pr(y=three_ch|x): 0.9362 . qui ologit mchilds age educ lesbian liberal faminc . prvalue, x(age max educ min) brief dif Current Saved Difference Pr(y=no_child|x): 0.0036 0.0065 -0.0029 Pr(y=one_chil|x): 0.0063 0.0106 -0.0043 Pr(y=two_chil|x): 0.0301 0.0468 -0.0167 Pr(y=three_ch|x): 0.9600 0.9362 0.0239 . qui mlogit mchilds age educ lesbian liberal . prvalue, x(age 40 educ 12) brief save Predicted probabilities for each category: Pr(y=no_child|x): 0.1949 Pr(y=one_chil|x): 0.2174 Pr(y=two_chil|x): 0.2951 Pr(y=three_ch|x): 0.2927 . qui mlogit mchilds age educ lesbian liberal faminc . prvalue, x(age 40 educ 12 liberal 5) brief dif Predicted probabilities for each category: Current Saved Difference Pr(y=no_child|x): 0.2090 0.1949 0.0142 Pr(y=one_chil|x): 0.2369 0.2174 0.0195 Pr(y=two_chil|x): 0.3130 0.2951 0.0179 Pr(y=three_ch|x): 0.2411 0.2927 -0.0516 . qui poisson ctchilds age educ lesbian liberal . prvalue, x(age 40 educ 12 liberal 4) brief save maxcnt(7) Predicted rate: 1.7006 Predicted probabilities: Pr(y=0|x): 0.1826 Pr(y=1|x): 0.3105 Pr(y=2|x): 0.2640 Pr(y=3|x): 0.1497 Pr(y=4|x): 0.0636 Pr(y=5|x): 0.0216 Pr(y=6|x): 0.0061 Pr(y=7|x): 0.0015 . qui poisson ctchilds age educ lesbian liberal feminist . prvalue, x(age 40 educ 12 liberal 2) brief dif maxcnt(7) Predicted rate: 1.8541 Saved: 1.7006 Difference: .15343 Predicted probabilities: Current Saved Difference Pr(y=0|x): 0.1566 0.1826 -0.0260 Pr(y=1|x): 0.2903 0.3105 -0.0201 Pr(y=2|x): 0.2692 0.2640 0.0052 Pr(y=3|x): 0.1663 0.1497 0.0167 Pr(y=4|x): 0.0771 0.0636 0.0135 Pr(y=5|x): 0.0286 0.0216 0.0069 Pr(y=6|x): 0.0088 0.0061 0.0027 Pr(y=7|x): 0.0023 0.0015 0.0008 . . * CHECK THAT PRVALUE STILL WORKS WITH LONG NAMES . . use gsstestdata.dta, clear . . rename age age_stupid_long_name_age . rename educ educ_stupid_long_name_educ . rename lesbian lesbian_stupid_long_name_lesbian . rename liberal liberal_stupid_long_name_liberal . rename faminc faminc_stupid_long_name_faminc . . qui logit feminist age educ lesbian liberal . prvalue, x(age 40 educ 12) save logit: Predictions for feminist Pr(y=Yes|x): 0.2560 95% ci: (0.2188,0.2972) Pr(y=No|x): 0.7440 95% ci: (0.7028,0.7812) age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 12 .02452316 2.9019074 . qui logit feminist age educ lesbian liberal faminc . prvalue, x(age 40 educ 12) dif logit: Change in Predictions for feminist Current Saved Difference Pr(y=Yes|x): 0.2551 0.2560 -0.0009 Pr(y=No|x): 0.7449 0.7440 0.0009 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l faminc_stu~c Current= 40 12 .02556818 2.921875 35.45348 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 12 .02452316 2.9019074 . . qui ologit mchilds age educ lesbian liberal . prvalue, x(age max educ min) save ologit: Predictions for mchilds Pr(y=no_child|x): 0.0065 Pr(y=one_chil|x): 0.0106 Pr(y=two_chil|x): 0.0468 Pr(y=three_ch|x): 0.9362 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 89 0 .02450331 2.8768212 . qui ologit mchilds age educ lesbian liberal faminc . prvalue, x(age max educ min) dif ologit: Change in Predictions for mchilds Current Saved Difference Pr(y=no_child|x): 0.0036 0.0065 -0.0029 Pr(y=one_chil|x): 0.0063 0.0106 -0.0043 Pr(y=two_chil|x): 0.0301 0.0468 -0.0167 Pr(y=three_ch|x): 0.9600 0.9362 0.0239 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l faminc_stu~c Current= 89 0 .0252809 2.883427 35.129038 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 89 0 .02450331 2.8768212 . . qui mlogit mchilds age educ lesbian liberal . prvalue, x(age 40 educ 12) save mlogit: Predictions for mchilds Predicted probabilities for each category: Pr(y=no_child|x): 0.1949 Pr(y=one_chil|x): 0.2174 Pr(y=two_chil|x): 0.2951 Pr(y=three_ch|x): 0.2927 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 12 .02450331 2.8768212 . qui mlogit mchilds age educ lesbian liberal faminc . prvalue, x(age 40 educ 12 liberal 5) dif mlogit: Change in Predictions for mchilds Predicted probabilities for each category: Current Saved Difference Pr(y=no_child|x): 0.2090 0.1949 0.0142 Pr(y=one_chil|x): 0.2369 0.2174 0.0195 Pr(y=two_chil|x): 0.3130 0.2951 0.0179 Pr(y=three_ch|x): 0.2411 0.2927 -0.0516 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l faminc_stu~c Current= 40 12 .0252809 5 35.129038 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 12 .02450331 2.8768212 . . qui poisson ctchilds age educ lesbian liberal . prvalue, x(age 40 educ 12 liberal 4) save maxcnt(7) poisson: Predictions for ctchilds Predicted rate: 1.7006 95% CI [1.6087 , 1.7978] Predicted probabilities: Pr(y=0|x): 0.1826 Pr(y=1|x): 0.3105 Pr(y=2|x): 0.2640 Pr(y=3|x): 0.1497 Pr(y=4|x): 0.0636 Pr(y=5|x): 0.0216 Pr(y=6|x): 0.0061 Pr(y=7|x): 0.0015 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 12 .02450331 4 . qui poisson ctchilds age educ lesbian liberal feminist . prvalue, x(age 40 educ 12 liberal 2) dif maxcnt(7) poisson: Change in Predictions for ctchilds Predicted rate: 1.8541 95% CI [1.7202 , 1.9983] Saved: 1.7006 Difference: .15343 Predicted probabilities: Current Saved Difference Pr(y=0|x): 0.1566 0.1826 -0.0260 Pr(y=1|x): 0.2903 0.3105 -0.0201 Pr(y=2|x): 0.2692 0.2640 0.0052 Pr(y=3|x): 0.1663 0.1497 0.0167 Pr(y=4|x): 0.0771 0.0636 0.0135 Pr(y=5|x): 0.0286 0.0216 0.0069 Pr(y=6|x): 0.0088 0.0061 0.0027 Pr(y=7|x): 0.0023 0.0015 0.0008 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l feminist Current= 40 12 .02465753 2 .29452055 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 12 .02450331 4 . . qui nbreg ctchilds age educ lesbian liberal . prvalue, x(age 40 educ 12 liberal 3) save nbreg: Predictions for ctchilds Predicted rate: 1.7806 Predicted probabilities: Pr(y=0|x): 0.1781 Pr(y=1|x): 0.2979 Pr(y=2|x): 0.2581 Pr(y=3|x): 0.1544 Pr(y=4|x): 0.0716 Pr(y=5|x): 0.0274 Pr(y=6|x): 0.0090 Pr(y=7|x): 0.0026 Pr(y=8|x): 0.0007 Pr(y=9|x): 0.0002 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 12 .02450331 3 . qui nbreg ctchilds age educ lesbian liberal feminist . prvalue, x(age 40 educ 12 liberal 7) dif nbreg: Change in Predictions for ctchilds Predicted rate: 1.4682 Saved: 1.7806 Difference: -.31238 Predicted probabilities: Current Saved Difference Pr(y=0|x): 0.2403 0.1781 0.0622 Pr(y=1|x): 0.3328 0.2979 0.0350 Pr(y=2|x): 0.2399 0.2581 -0.0182 Pr(y=3|x): 0.1198 0.1544 -0.0345 Pr(y=4|x): 0.0466 0.0716 -0.0250 Pr(y=5|x): 0.0150 0.0274 -0.0124 Pr(y=6|x): 0.0042 0.0090 -0.0049 Pr(y=7|x): 0.0010 0.0026 -0.0016 Pr(y=8|x): 0.0002 0.0007 -0.0005 Pr(y=9|x): 0.0000 0.0002 -0.0001 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l feminist Current= 40 12 .02465753 7 .29452055 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 12 .02450331 3 . . qui zip zchilds age educ lesbian liberal, inf(age faminc liberal) . prvalue, x(age_stupid_long_name_age 40 educ_stupid_long_name_educ median fami > nc_stupid_long_name_faminc 45) save zip: Predictions for zchilds Predicted rate: .43546 Predicted probabilities: Pr(y=0|x,z): 0.8742 Pr(y=1|x): 0.1004 Pr(y=2|x): 0.0219 Pr(y=3|x): 0.0032 Pr(y=4|x): 0.0003 Pr(y=5|x): 0.0000 Pr(y=6|x): 0.0000 Pr(y=7|x): 0.0000 Pr(y=8|x): 0.0000 Pr(y=9|x): 0.0000 Pr(Always0|z): 0.6437 x values for count equation age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 13 .0252809 2.883427 z values for binary equation age_stupid~e faminc_stu~c liberal_st~l z= 40 45 2.883427 . qui zip zchilds age educ lesbian liberal, inf(age educ faminc) . prvalue, x(age_stupid_long_name_age max educ_stupid_long_name_educ 12 faminc_ > stupid_long_name_faminc mean) dif zip: Change in Predictions for zchilds Predicted rate: 1.4889 Saved: .43546 Difference: 1.0534 Predicted probabilities: Current Saved Difference Pr(y=0|x,z): 0.3834 0.8742 -0.4908 Pr(y=1|x): 0.2675 0.1004 0.1671 Pr(y=2|x): 0.1991 0.0219 0.1773 Pr(y=3|x): 0.0988 0.0032 0.0957 Pr(y=4|x): 0.0368 0.0003 0.0364 Pr(y=5|x): 0.0110 0.0000 0.0109 Pr(y=6|x): 0.0027 0.0000 0.0027 Pr(y=7|x): 0.0006 0.0000 0.0006 Pr(y=8|x): 0.0001 0.0000 0.0001 Pr(y=9|x): 0.0000 0.0000 0.0000 Pr(Always0|z): 0.2037 0.6437 -0.4400 x values for count equation age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Current= 89 12 .0252809 2.883427 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 13 .0252809 2.883427 z values for binary equation age_stupid~e educ_stupi~c faminc_stu~c Current= 89 12 .0252809 age_stupid~e faminc_stu~c liberal_st~l Saved= 40 45 2.883427 . . qui zinb zchilds age educ lesbian liberal, inf(age educ faminc) . prvalue, x(age 40 educ 12 faminc_stupid_long_name_faminc 45) save zinb: Predictions for zchilds Predicted rate: .668 Predicted probabilities: Pr(y=0|x,z): 0.6718 Pr(y=1|x): 0.1968 Pr(y=2|x): 0.0788 Pr(y=3|x): 0.0315 Pr(y=4|x): 0.0126 Pr(y=5|x): 0.0050 Pr(y=6|x): 0.0020 Pr(y=7|x): 0.0008 Pr(y=8|x): 0.0003 Pr(y=9|x): 0.0001 Pr(Always0|z): 0.1809 x values for count equation age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l x= 40 12 .0252809 2.883427 z values for binary equation age_stupid~e educ_stupi~c faminc_stu~c z= 40 12 45 . prvalue, x(age 40 educ 12 faminc_stupid_long_name_faminc 60) dif zinb: Change in Predictions for zchilds Predicted rate: .67214 Saved: .668 Difference: .00414 Predicted probabilities: Current Saved Difference Pr(y=0|x,z): 0.6686 0.6718 -0.0033 Pr(y=1|x): 0.1983 0.1968 0.0015 Pr(y=2|x): 0.0797 0.0788 0.0009 Pr(y=3|x): 0.0320 0.0315 0.0005 Pr(y=4|x): 0.0129 0.0126 0.0002 Pr(y=5|x): 0.0052 0.0050 0.0001 Pr(y=6|x): 0.0021 0.0020 0.0001 Pr(y=7|x): 0.0008 0.0008 0.0000 Pr(y=8|x): 0.0003 0.0003 0.0000 Pr(y=9|x): 0.0001 0.0001 0.0000 Pr(Always0|z): 0.1758 0.1809 -0.0051 x values for count equation age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Current= 40 12 .0252809 2.883427 age_stupid~e educ_stupi~c lesbian_st~n liberal_st~l Saved= 40 12 .0252809 2.883427 z values for binary equation age_stupid~e educ_stupi~c faminc_stu~c Current= 40 12 60 age_stupid~e educ_stupi~c faminc_stu~c Saved= 40 12 45 . . use nels_censored2, clear (nels_censored.dta after compress.) . . rename bymomed bymomed_stupid_long_name_bymomed . rename black black_stupid_long_name_black . rename hispanic hispanic_stupid_long_name . . qui tobit tobiscor bymomed bydaded byincome black hispanic pctlunch, ul(125) > ll(75) . prvalue, x(bymomed 3 black 1) rest(grmedian) save tobit: Predictions for tobiscor Predicted value of y*: 90.84033 95% ci: ( 89.40199, 92.27868) bymomed_st~d bydaded byincome black_stup~k hispanic_s~e x= 3 3 22.5 1 0 pctlunch x= 40 . prvalue, x(bymomed 3 black 0) rest(grmedian) dif tobit: Change in Predictions for tobiscor Predicted value of y*: 103.7364 95% ci: ( 103.1551, 104.3176) Saved value of y*: 90.84033 Difference: 12.89605 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Current= 3 3 30 0 0 pctlunch Current= 15 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Saved= 3 3 22.5 1 0 pctlunch Saved= 40 . . qui regress realscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(grmean) save regress: Predictions for realscor Predicted value of y: 92.33727 95% ci: ( 91.00945, 93.6651) bymomed_st~d bydaded byincome black_stup~k hispanic_s~e x= 3 3.0142857 25.110714 1 0 pctlunch x= 35.542857 . qui regress realscor bymomed bydaded byincome black hispanic pctlunch pctmino > r . prvalue, x(bymomed 3 black 1) rest(grmean) dif regress: Change in Predictions for realscor Predicted value of y: 92.29177 95% ci: ( 90.96018, 93.62336) Saved value of yHat: 92.33727 Difference: -.0455017 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Current= 3 3.0144928 25.039855 1 0 pctlunch pctminor Current= 36.057971 58.217391 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Saved= 3 3.0142857 25.110714 1 0 pctlunch Saved= 35.542857 . . qui intreg minscor maxscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(max) save intreg: Predictions for minscor maxscor Predicted value of y*: 99.27156 95% ci: ( 95.84524, 102.6979) bymomed_st~d bydaded byincome black_stup~k hispanic_s~e x= 3 7 200 1 1 pctlunch x= 87.5 . qui intreg minscor maxscor bymomed bydaded byincome black hispanic pctlunch . prvalue, x(bymomed 3 black 1) rest(min) dif intreg: Change in Predictions for minscor maxscor Predicted value of y*: 88.80298 95% ci: ( 87.01354, 90.59241) Saved value of y*: 99.27156 Difference: -10.46858 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Current= 3 1 0 1 0 pctlunch Current= 0 bymomed_st~d bydaded byincome black_stup~k hispanic_s~e Saved= 3 7 200 1 1 pctlunch Saved= 87.5 . . log close log: C:\~SLJF\makeverifyfiles\spostverify\done\prvalueverify.log log type: text closed on: 25 Mar 2001, 14:22:32 -------------------------------------------------------------------------------