------------------------------------------------------------------------------------------------------------------------------- log: c:\drive\econ272\econ771_march_27_2008.log log type: text opened on: 27 Mar 2008, 10:01:12 . use "C:\drive\econ276\ngercl.dta", clear . su Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- id | 5289 882 508.9823 1 1763 treat | 5289 1.811685 .7135545 1 3 choice | 5289 .3333333 .4714491 0 1 pout | 5289 1.139493 1.238523 0 5 pcost | 5289 1.466228 1.598897 0 6.84 -------------+-------------------------------------------------------- pdrug | 5289 57.4853 42.83291 0 100 pc | 5289 .8166704 .6405193 0 2 educ_1 | 5289 .5273209 1.184103 0 6 sex_1 | 5289 .5396105 .8186498 0 7 urban_1 | 5289 .1798071 .384063 0 1 -------------+-------------------------------------------------------- educ_2 | 5289 .5273209 1.184103 0 6 sex_2 | 5289 .5396105 .8186498 0 7 urban_2 | 5289 .1798071 .384063 0 1 choice1 | 5289 .3333333 .4714491 0 1 choice2 | 5289 .3333333 .4714491 0 1 -------------+-------------------------------------------------------- treat_a | 0 . list id treat choice pout pcost +--------------------------------------+ | id treat choice pout pcost | |--------------------------------------| 1. | 1 1 1 0 0 | 2. | 1 1 0 1 2.12 | 3. | 1 1 0 3.25 2.65 | 4. | 2 1 1 0 0 | 5. | 2 1 0 1 2.12 | |--------------------------------------| 6. | 2 1 0 3.25 2.65 | 7. | 3 2 0 0 0 | 8. | 3 2 1 1 2.12 | 9. | 3 2 0 3.25 2.65 | 10. | 4 2 0 0 0 | |--------------------------------------| 11. | 4 2 1 1 2.12 | 12. | 4 2 0 3.25 2.65 | 13. | 5 1 1 0 0 | 14. | 5 1 0 1 2.12 | 15. | 5 1 0 3.25 2.65 | |--------------------------------------| 16. | 6 3 0 0 0 | 17. | 6 3 0 1 2.12 | 18. | 6 3 1 3.25 2.65 | 19. | 7 2 0 0 0 | 20. | 7 2 1 1 2.12 | |--------------------------------------| 21. | 7 2 0 3.25 2.65 | 22. | 8 2 0 0 0 | 23. | 8 2 1 1 2.12 | 24. | 8 2 0 3.25 2.65 | --Break-- r(1); . list id treat choice pout pcost choice1 choice2 educ_1 educ_2 +----------------------------------------------------------------------------+ | id treat choice pout pcost choice1 choice2 educ_1 educ_2 | |----------------------------------------------------------------------------| 1. | 1 1 1 0 0 1 0 2 0 | 2. | 1 1 0 1 2.12 0 1 0 2 | 3. | 1 1 0 3.25 2.65 0 0 0 0 | 4. | 2 1 1 0 0 1 0 2 0 | 5. | 2 1 0 1 2.12 0 1 0 2 | |----------------------------------------------------------------------------| 6. | 2 1 0 3.25 2.65 0 0 0 0 | 7. | 3 2 0 0 0 1 0 1 0 | 8. | 3 2 1 1 2.12 0 1 0 1 | 9. | 3 2 0 3.25 2.65 0 0 0 0 | 10. | 4 2 0 0 0 1 0 5 0 | |----------------------------------------------------------------------------| 11. | 4 2 1 1 2.12 0 1 0 5 | 12. | 4 2 0 3.25 2.65 0 0 0 0 | 13. | 5 1 1 0 0 1 0 6 0 | 14. | 5 1 0 1 2.12 0 1 0 6 | 15. | 5 1 0 3.25 2.65 0 0 0 0 | |----------------------------------------------------------------------------| 16. | 6 3 0 0 0 1 0 1 0 | 17. | 6 3 0 1 2.12 0 1 0 1 | 18. | 6 3 1 3.25 2.65 0 0 0 0 | 19. | 7 2 0 0 0 1 0 6 0 | 20. | 7 2 1 1 2.12 0 1 0 6 | |----------------------------------------------------------------------------| 21. | 7 2 0 3.25 2.65 0 0 0 0 | 22. | 8 2 0 0 0 1 0 0 0 | 23. | 8 2 1 1 2.12 0 1 0 0 | 24. | 8 2 0 3.25 2.65 0 0 0 0 | --Break-- r(1); . clogit choice pout pcost pdrug pc,group(id) Iteration 0: log likelihood = -1849.8993 Iteration 1: log likelihood = -1844.4421 Iteration 2: log likelihood = -1844.4315 Iteration 3: log likelihood = -1844.4315 Conditional (fixed-effects) logistic regression Number of obs = 5289 LR chi2(4) = 184.84 Prob > chi2 = 0.0000 Log likelihood = -1844.4315 Pseudo R2 = 0.0477 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- pout | -.333029 .0442378 -7.53 0.000 -.4197336 -.2463245 pcost | .2045598 .0289008 7.08 0.000 .1479153 .2612043 pdrug | -.0008923 .0018715 -0.48 0.634 -.0045604 .0027757 pc | -.0046686 .1337603 -0.03 0.972 -.266834 .2574969 ------------------------------------------------------------------------------ . predict p1 p2 p3 varlist not allowed r(101); . predict '' found where varname expected r(7); . clogit choice pout pcost pdrug pc choice1 educ_1 sex_1 urban_1 choice2 educ_2 sex_2 urban_2,group(id) Iteration 0: log likelihood = -1800.1171 Iteration 1: log likelihood = -1748.6736 Iteration 2: log likelihood = -1745.5021 Iteration 3: log likelihood = -1745.4989 Iteration 4: log likelihood = -1745.4989 Conditional (fixed-effects) logistic regression Number of obs = 5289 LR chi2(12) = 382.71 Prob > chi2 = 0.0000 Log likelihood = -1745.4989 Pseudo R2 = 0.0988 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- pout | -.1518682 .0563947 -2.69 0.007 -.2623998 -.0413366 pcost | .0848445 .0371607 2.28 0.022 .0120109 .1576782 pdrug | .0127003 .0038771 3.28 0.001 .0051012 .0202993 pc | -.1850849 .141897 -1.30 0.192 -.4631979 .093028 choice1 | 3.633586 .4947249 7.34 0.000 2.663943 4.603229 educ_1 | -.0735786 .0450996 -1.63 0.103 -.1619722 .014815 sex_1 | -.5875991 .1476005 -3.98 0.000 -.8768908 -.2983074 urban_1 | -1.52924 .1682778 -9.09 0.000 -1.859059 -1.199422 choice2 | 2.787968 .313622 8.89 0.000 2.17328 3.402655 educ_2 | -.0748368 .0434112 -1.72 0.085 -.1599212 .0102476 sex_2 | -.4480452 .1427234 -3.14 0.002 -.7277779 -.1683126 urban_2 | -1.370166 .1653609 -8.29 0.000 -1.694268 -1.046065 ------------------------------------------------------------------------------ . clogit choice choice1 educ_1 sex_1 urban_1 choice2 educ_2 sex_2 urban_2,group(id) Iteration 0: log likelihood = -1805.8137 Iteration 1: log likelihood = -1756.3469 Iteration 2: log likelihood = -1753.4202 Iteration 3: log likelihood = -1753.4174 Iteration 4: log likelihood = -1753.4174 Conditional (fixed-effects) logistic regression Number of obs = 5289 LR chi2(8) = 366.87 Prob > chi2 = 0.0000 Log likelihood = -1753.4174 Pseudo R2 = 0.0947 ------------------------------------------------------------------------------ choice | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- choice1 | 2.807334 .3009973 9.33 0.000 2.217391 3.397278 educ_1 | -.0775987 .0448307 -1.73 0.083 -.1654652 .0102678 sex_1 | -.5956933 .1474354 -4.04 0.000 -.8846614 -.3067253 urban_1 | -1.495617 .1673902 -8.93 0.000 -1.823696 -1.167538 choice2 | 2.788677 .2931171 9.51 0.000 2.214178 3.363176 educ_2 | -.0767496 .0430805 -1.78 0.075 -.1611857 .0076865 sex_2 | -.4711153 .1423913 -3.31 0.001 -.7501971 -.1920335 urban_2 | -1.420898 .1631714 -8.71 0.000 -1.740708 -1.101088 ------------------------------------------------------------------------------ . clear . use "C:\drive\econ276\nger.dta", clear . mlogit TREAT EDUC SEX URBAN Iteration 0: log likelihood = -1821.8286 Iteration 1: log likelihood = -1757.2115 Iteration 2: log likelihood = -1753.4518 Iteration 3: log likelihood = -1753.4174 Iteration 4: log likelihood = -1753.4174 Multinomial logistic regression Number of obs = 1763 LR chi2(6) = 136.82 Prob > chi2 = 0.0000 Log likelihood = -1753.4174 Pseudo R2 = 0.0376 ------------------------------------------------------------------------------ TREAT | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1 | EDUC | -.0008491 .0356497 -0.02 0.981 -.0707213 .0690231 SEX | -.124578 .1067859 -1.17 0.243 -.3338745 .0847184 URBAN | -.0747187 .1093457 -0.68 0.494 -.2890323 .1395949 _cons | .0186575 .1989875 0.09 0.925 -.3713509 .4086659 -------------+---------------------------------------------------------------- 3 | EDUC | .0767496 .0430805 1.78 0.075 -.0076865 .1611857 SEX | .4711153 .1423913 3.31 0.001 .1920335 .7501971 URBAN | 1.420898 .1631714 8.71 0.000 1.101088 1.740708 _cons | -2.788677 .2931171 -9.51 0.000 -3.363176 -2.214178 ------------------------------------------------------------------------------ (TREAT==2 is the base outcome) . mlogit TREAT EDUC SEX URBAN,base(3) Iteration 0: log likelihood = -1821.8286 Iteration 1: log likelihood = -1757.2115 Iteration 2: log likelihood = -1753.4518 Iteration 3: log likelihood = -1753.4174 Iteration 4: log likelihood = -1753.4174 Multinomial logistic regression Number of obs = 1763 LR chi2(6) = 136.82 Prob > chi2 = 0.0000 Log likelihood = -1753.4174 Pseudo R2 = 0.0376 ------------------------------------------------------------------------------ TREAT | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- 1 | EDUC | -.0775987 .0448307 -1.73 0.083 -.1654652 .0102678 SEX | -.5956933 .1474354 -4.04 0.000 -.8846614 -.3067253 URBAN | -1.495617 .1673902 -8.93 0.000 -1.823696 -1.167538 _cons | 2.807334 .3009973 9.33 0.000 2.217391 3.397278 -------------+---------------------------------------------------------------- 2 | EDUC | -.0767496 .0430805 -1.78 0.075 -.1611857 .0076865 SEX | -.4711153 .1423913 -3.31 0.001 -.7501971 -.1920335 URBAN | -1.420898 .1631714 -8.71 0.000 -1.740708 -1.101088 _cons | 2.788677 .2931171 9.51 0.000 2.214178 3.363176 ------------------------------------------------------------------------------ (TREAT==3 is the base outcome) . clear . use "C:\drive\econ276\zismall.dta", clear . ta births births | Freq. Percent Cum. ------------+----------------------------------- 0 | 1,162 28.70 28.70 1 | 558 13.78 42.48 2 | 455 11.24 53.72 3 | 402 9.93 63.65 4 | 382 9.43 73.08 5 | 297 7.34 80.41 6 | 239 5.90 86.32 7 | 180 4.45 90.76 8 | 134 3.31 94.07 9 | 103 2.54 96.62 10 | 75 1.85 98.47 11 | 32 0.79 99.26 12 | 19 0.47 99.73 13 | 6 0.15 99.88 14 | 2 0.05 99.93 15 | 2 0.05 99.98 17 | 1 0.02 100.00 ------------+----------------------------------- Total | 4,049 100.00 . oprobit births ageyr educf city goodwat goodsan Iteration 0: log likelihood = -8852.7556 Iteration 1: log likelihood = -6853.4171 Iteration 2: log likelihood = -6773.3408 Iteration 3: log likelihood = -6772.3929 Iteration 4: log likelihood = -6772.3927 Ordered probit regression Number of obs = 4044 LR chi2(5) = 4160.73 Prob > chi2 = 0.0000 Log likelihood = -6772.3927 Pseudo R2 = 0.2350 ------------------------------------------------------------------------------ births | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ageyr | .1328221 .002473 53.71 0.000 .1279751 .137669 educf | -.0770414 .0056072 -13.74 0.000 -.0880312 -.0660515 city | -.1788536 .0562648 -3.18 0.001 -.2891306 -.0685766 goodwat | .0158268 .0518945 0.30 0.760 -.0858846 .1175382 goodsan | -.0918231 .04737 -1.94 0.053 -.1846667 .0010204 -------------+---------------------------------------------------------------- /cut1 | 2.022959 .0795288 1.867085 2.178833 /cut2 | 2.702394 .0824335 2.540828 2.863961 /cut3 | 3.241408 .0854532 3.073923 3.408893 /cut4 | 3.723009 .0885082 3.549536 3.896482 /cut5 | 4.222049 .0921138 4.04151 4.402589 /cut6 | 4.667542 .0956045 4.480161 4.854923 /cut7 | 5.10055 .0993095 4.905907 5.295193 /cut8 | 5.508821 .103157 5.306637 5.711005 /cut9 | 5.908453 .1074924 5.697772 6.119134 /cut10 | 6.339944 .1133817 6.11772 6.562168 /cut11 | 6.862621 .1241249 6.619341 7.105901 /cut12 | 7.267541 .1373433 6.998353 7.536729 /cut13 | 7.731518 .1649737 7.408175 8.05486 /cut14 | 8.050179 .2008016 7.656615 8.443743 /cut15 | 8.242217 .2337548 7.784066 8.700368 /cut16 | 8.639226 .3521825 7.948961 9.329491 ------------------------------------------------------------------------------ . poisson births ageyr educf city goodwat goodsan Iteration 0: log likelihood = -7349.5972 Iteration 1: log likelihood = -7349.5525 Iteration 2: log likelihood = -7349.5525 Poisson regression Number of obs = 4044 LR chi2(5) = 7227.86 Prob > chi2 = 0.0000 Log likelihood = -7349.5525 Pseudo R2 = 0.3296 ------------------------------------------------------------------------------ births | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ageyr | .0696375 .0010326 67.44 0.000 .0676136 .0716613 educf | -.0444119 .0030886 -14.38 0.000 -.0504655 -.0383584 city | -.1170645 .031296 -3.74 0.000 -.1784036 -.0557255 goodwat | .0160715 .0275851 0.58 0.560 -.0379944 .0701374 goodsan | -.0562391 .0249483 -2.25 0.024 -.105137 -.0073412 _cons | -.8264325 .044497 -18.57 0.000 -.9136451 -.7392199 ------------------------------------------------------------------------------ . regress births ageyr educf city goodwat goodsan Source | SS df MS Number of obs = 4044 -------------+------------------------------ F( 5, 4038) = 1464.84 Model | 22777.0925 5 4555.41851 Prob > F = 0.0000 Residual | 12557.5207 4038 3.10983673 R-squared = 0.6446 -------------+------------------------------ Adj R-squared = 0.6442 Total | 35334.6133 4043 8.73970152 Root MSE = 1.7635 ------------------------------------------------------------------------------ births | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- ageyr | .2256411 .003229 69.88 0.000 .2193104 .2319717 educf | -.1181479 .009214 -12.82 0.000 -.1362125 -.1000834 city | -.3006671 .0918686 -3.27 0.001 -.4807802 -.1205541 goodwat | -.0891928 .0853796 -1.04 0.296 -.2565839 .0781983 goodsan | -.1828978 .0774993 -2.36 0.018 -.3348392 -.0309564 _cons | -2.377349 .1248686 -19.04 0.000 -2.62216 -2.132537 ------------------------------------------------------------------------------ . poisson births ageyr educf city goodwat goodsan Iteration 0: log likelihood = -7349.5972 Iteration 1: log likelihood = -7349.5525 Iteration 2: log likelihood = -7349.5525 Poisson regression Number of obs = 4044 LR chi2(5) = 7227.86 Prob > chi2 = 0.0000 Log likelihood = -7349.5525 Pseudo R2 = 0.3296 ------------------------------------------------------------------------------ births | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ageyr | .0696375 .0010326 67.44 0.000 .0676136 .0716613 educf | -.0444119 .0030886 -14.38 0.000 -.0504655 -.0383584 city | -.1170645 .031296 -3.74 0.000 -.1784036 -.0557255 goodwat | .0160715 .0275851 0.58 0.560 -.0379944 .0701374 goodsan | -.0562391 .0249483 -2.25 0.024 -.105137 -.0073412 _cons | -.8264325 .044497 -18.57 0.000 -.9136451 -.7392199 ------------------------------------------------------------------------------ . mfx Marginal effects after poisson y = predicted number of events (predict) = 2.1708729 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- ageyr | .1511741 .00206 73.44 0.000 .14714 .155208 27.7995 educf | -.0964126 .00666 -14.47 0.000 -.10947 -.083355 6.09891 city*| -.2497616 .06563 -3.81 0.000 -.378386 -.121137 .346934 goodwat*| .0349106 .05995 0.58 0.560 -.082597 .152418 .462413 goodsan*| -.1223675 .05441 -2.25 0.025 -.229019 -.015716 .538328 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . predict pbirths (option n assumed; predicted number of events) (5 missing values generated) . su births pbirths Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- births | 4049 2.929859 2.956038 0 17 pbirths | 4044 2.930762 2.548884 .6816615 13.489 . nbreg births ageyr educf city goodwat goodsan Fitting Poisson model: Iteration 0: log likelihood = -7349.5972 Iteration 1: log likelihood = -7349.5525 Iteration 2: log likelihood = -7349.5525 Fitting constant-only model: Iteration 0: log likelihood = -9014.9635 Iteration 1: log likelihood = -9014.4318 Iteration 2: log likelihood = -9014.4318 Fitting full model: Iteration 0: log likelihood = -8046.3623 Iteration 1: log likelihood = -7346.2944 Iteration 2: log likelihood = -7230.5348 Iteration 3: log likelihood = -7221.3579 Iteration 4: log likelihood = -7221.353 Iteration 5: log likelihood = -7221.353 Negative binomial regression Number of obs = 4044 LR chi2(5) = 3586.16 Dispersion = mean Prob > chi2 = 0.0000 Log likelihood = -7221.353 Pseudo R2 = 0.1989 ------------------------------------------------------------------------------ births | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- ageyr | .0775851 .0014377 53.97 0.000 .0747672 .0804029 educf | -.0513408 .0038177 -13.45 0.000 -.0588233 -.0438582 city | -.1011378 .0391401 -2.58 0.010 -.177851 -.0244246 goodwat | .0223922 .0349904 0.64 0.522 -.0461876 .0909721 goodsan | -.0528415 .0314609 -1.68 0.093 -.1145037 .0088208 _cons | -1.050936 .0566342 -18.56 0.000 -1.161937 -.9399353 -------------+---------------------------------------------------------------- /lnalpha | -2.051793 .0854778 -2.219327 -1.88426 -------------+---------------------------------------------------------------- alpha | .1285043 .0109843 .1086823 .1519415 ------------------------------------------------------------------------------ Likelihood-ratio test of alpha=0: chibar2(01) = 256.40 Prob>=chibar2 = 0.000 . mfx Marginal effects after nbreg y = predicted number of events (predict) = 2.0950628 ------------------------------------------------------------------------------ variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X ---------+-------------------------------------------------------------------- ageyr | .1625456 .00285 57.07 0.000 .156963 .168128 27.7995 educf | -.1075621 .00794 -13.55 0.000 -.123124 -.092001 6.09891 city*| -.208724 .0796 -2.62 0.009 -.364732 -.052716 .346934 goodwat*| .0469536 .07343 0.64 0.523 -.096963 .19087 .462413 goodsan*| -.1109435 .06621 -1.68 0.094 -.240704 .018817 .538328 ------------------------------------------------------------------------------ (*) dy/dx is for discrete change of dummy variable from 0 to 1 . predict nbirths (option n assumed; predicted number of events) (5 missing values generated) . su births pbirths nbirths Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- births | 4049 2.929859 2.956038 0 17 pbirths | 4044 2.930762 2.548884 .6816615 13.489 nbirths | 4044 3.041799 2.978401 .5873378 16.00856 . log clode clode invalid r(198); . log close log: c:\drive\econ272\econ771_march_27_2008.log log type: text closed on: 27 Mar 2008, 10:38:53 -----------------------------------------------------------------------------------------------------------------------------