------------------------------------------------------------------------------------------------------------------------------------ log: C:\stataproject\micrometrics\hw6\hw6.log log type: text opened on: 12 Nov 2002, 19:40:12 . *Page 294, 10.7 GPA of student athlete; . use \stataproject\micrometrics\hw6\gpa.dta,replace; . *Fixed Effects Estimation; . xtreg trmgpa spring crsgpa frstsem season, fe i(id); Fixed-effects (within) regression Number of obs = 732 Group variable (i) : id Number of groups = 366 R-sq: within = 0.2069 Obs per group: min = 2 between = 0.0333 avg = 2.0 overall = 0.0613 max = 2 F(4,362) = 23.61 corr(u_i, Xb) = -0.0893 Prob > F = 0.0000 ------------------------------------------------------------------------------ trmgpa | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- spring | -.0657817 .0391404 -1.68 0.094 -.1427528 .0111895 crsgpa | 1.140688 .1186538 9.61 0.000 .9073505 1.374025 frstsem | .0128523 .0688364 0.19 0.852 -.1225172 .1482218 season | -.0566454 .0414748 -1.37 0.173 -.1382072 .0249165 _cons | -.7708055 .3305004 -2.33 0.020 -1.420747 -.1208636 -------------+---------------------------------------------------------------- sigma_u | .67913296 sigma_e | .40882825 rho | .73400603 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(365, 362) = 5.40 Prob > F = 0.0000 . hausman,save; . *Random Effects Estimation; . xtreg trmgpa spring crsgpa frstsem season sat verbmath hsperc hssize black female, re i(id); Random-effects GLS regression Number of obs = 732 Group variable (i) : id Number of groups = 366 R-sq: within = 0.2067 Obs per group: min = 2 between = 0.5390 avg = 2.0 overall = 0.4785 max = 2 Random effects u_i ~ Gaussian Wald chi2(10) = 512.77 corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ trmgpa | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- spring | -.0606536 .0371605 -1.63 0.103 -.1334868 .0121797 crsgpa | 1.082365 .0930877 11.63 0.000 .8999166 1.264814 frstsem | .0029948 .0599542 0.05 0.960 -.1145132 .1205028 season | -.0440992 .0392381 -1.12 0.261 -.1210044 .032806 sat | .0017052 .0001771 9.63 0.000 .0013582 .0020523 verbmath | -.15752 .16351 -0.96 0.335 -.4779937 .1629538 hsperc | -.0084622 .0012426 -6.81 0.000 -.0108977 -.0060268 hssize | -.0000775 .0001248 -0.62 0.534 -.000322 .000167 black | -.2348189 .0681573 -3.45 0.001 -.3684048 -.1012331 female | .358153 .0612948 5.84 0.000 .2380173 .4782886 _cons | -1.73492 .3566599 -4.86 0.000 -2.43396 -1.035879 -------------+---------------------------------------------------------------- sigma_u | .37185442 sigma_e | .40882825 rho | .4527451 (fraction of variance due to u_i) ------------------------------------------------------------------------------ . hausman; ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | Prior Current Difference S.E. -------------+------------------------------------------------------------- spring | -.0657817 -.0606536 -.0051281 .012291 crsgpa | 1.140688 1.082365 .0583227 .0735758 frstsem | .0128523 .0029948 .0098575 .0338223 season | -.0566454 -.0440992 -.0125462 .0134363 --------------------------------------------------------------------------- b = less efficient estimates obtained previously from xtreg B = fully efficient estimates obtained from xtreg Test: Ho: difference in coefficients not systematic chi2( 4) = (b-B)'[(V_b-V_B)^(-1)](b-B) = 1.81 Prob>chi2 = 0.7702 . *Page 295, 10.10 Murder rate and death penalty; . use \stataproject\micrometrics\hw6\murder.dta,replace; . *First Difference Estimation; . *You MUST include time dummy because theta_t is included in the specification; . reg cmrdrte d93 cexec cunem; Source | SS df MS Number of obs = 102 -------------+------------------------------ F( 3, 98) = 0.84 Model | 46.7620386 3 15.5873462 Prob > F = 0.4736 Residual | 1812.28688 98 18.4927233 R-squared = 0.0252 -------------+------------------------------ Adj R-squared = -0.0047 Total | 1859.04892 101 18.406425 Root MSE = 4.3003 ------------------------------------------------------------------------------ cmrdrte | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d93 | -1.296717 1.016118 -1.28 0.205 -3.313171 .7197367 cexec | -.1150682 .1473871 -0.78 0.437 -.407553 .1774166 cunem | .1630854 .3079049 0.53 0.598 -.4479419 .7741127 _cons | 1.51099 .6608967 2.29 0.024 .1994623 2.822518 ------------------------------------------------------------------------------ . *Test of serical correlation of ideosyncratic error; . predict uhat,residual; (51 missing values generated) . gen uhatlag=uhat[_n-1] if id==id[_n-1]; (102 missing values generated) . reg uhat uhatlag; Source | SS df MS Number of obs = 51 -------------+------------------------------ F( 1, 49) = 0.06 Model | .075953071 1 .075953071 Prob > F = 0.8016 Residual | 58.3045094 49 1.18988795 R-squared = 0.0013 -------------+------------------------------ Adj R-squared = -0.0191 Total | 58.3804625 50 1.16760925 Root MSE = 1.0908 ------------------------------------------------------------------------------ uhat | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- uhatlag | .0065807 .0260465 0.25 0.802 -.0457618 .0589231 _cons | -9.10e-10 .1527453 -0.00 1.000 -.3069532 .3069532 ------------------------------------------------------------------------------ . *Fixed Effects Estimation; . xtreg mrdrte d90 d93 exec unem,i(id) fe; Fixed-effects (within) regression Number of obs = 153 Group variable (i) : id Number of groups = 51 R-sq: within = 0.0734 Obs per group: min = 3 between = 0.0037 avg = 3.0 overall = 0.0108 max = 3 F(4,98) = 1.94 corr(u_i, Xb) = 0.0010 Prob > F = 0.1098 ------------------------------------------------------------------------------ mrdrte | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d90 | 1.556215 .7453273 2.09 0.039 .0771369 3.035293 d93 | 1.733242 .7004381 2.47 0.015 .3432454 3.123239 exec | -.1383231 .1770059 -0.78 0.436 -.4895856 .2129395 unem | .2213158 .2963756 0.75 0.457 -.366832 .8094636 _cons | 5.822104 1.915611 3.04 0.003 2.020636 9.623572 -------------+---------------------------------------------------------------- sigma_u | 8.7527226 sigma_e | 3.5214244 rho | .86068589 (fraction of variance due to u_i) ------------------------------------------------------------------------------ F test that all u_i=0: F(50, 98) = 17.18 Prob > F = 0.0000 . *Page 295, 10.11 Lowbirth Weight and AFDC (Estimatoin of HH production function); . use \stataproject\micrometrics\hw6\lowbirth.dta,replace; . *OLS estimation with usual standard error; . reg lowbrth d90 afdcprc lphypc lbedspc lpcinc lpopul; Source | SS df MS Number of obs = 100 -------------+------------------------------ F( 6, 93) = 5.19 Model | 33.7710894 6 5.6285149 Prob > F = 0.0001 Residual | 100.834005 93 1.08423661 R-squared = 0.2509 -------------+------------------------------ Adj R-squared = 0.2026 Total | 134.605095 99 1.35964742 Root MSE = 1.0413 ------------------------------------------------------------------------------ lowbrth | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d90 | .5797136 .2761244 2.10 0.038 .0313853 1.128042 afdcprc | .0955932 .0921802 1.04 0.302 -.0874584 .2786448 lphypc | .3080648 .71546 0.43 0.668 -1.112697 1.728827 lbedspc | .2790041 .5130275 0.54 0.588 -.7397668 1.297775 lpcinc | -2.494685 .9783021 -2.55 0.012 -4.437399 -.5519712 lpopul | .739284 .7023191 1.05 0.295 -.6553825 2.133951 _cons | 26.57786 7.158022 3.71 0.000 12.36344 40.79227 ------------------------------------------------------------------------------ . *OLS estimation with serical correlation-robust standard error; . reg lowbrth d90 afdcprc lphypc lbedspc lpcinc lpopul,cluster(stateabb); Regression with robust standard errors Number of obs = 100 F( 6, 49) = 4.73 Prob > F = 0.0007 R-squared = 0.2509 Number of clusters (stateabb) = 50 Root MSE = 1.0413 ------------------------------------------------------------------------------ | Robust lowbrth | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- d90 | .5797136 .2214303 2.62 0.012 .1347327 1.024694 afdcprc | .0955932 .1199883 0.80 0.429 -.1455324 .3367188 lphypc | .3080648 .9063342 0.34 0.735 -1.513282 2.129411 lbedspc | .2790041 .7853754 0.36 0.724 -1.299267 1.857275 lpcinc | -2.494685 1.203901 -2.07 0.044 -4.914014 -.0753567 lpopul | .739284 .9041915 0.82 0.418 -1.077757 2.556325 _cons | 26.57786 9.29106 2.86 0.006 7.906773 45.24894 ------------------------------------------------------------------------------ . *First Difference Estimation; . reg clowbrth cafdcprc clphypc clbedspc clpcinc clpopul; Source | SS df MS Number of obs = 50 -------------+------------------------------ F( 5, 44) = 2.53 Model | .861531934 5 .172306387 Prob > F = 0.0428 Residual | 3.00026764 44 .068187901 R-squared = 0.2231 -------------+------------------------------ Adj R-squared = 0.1348 Total | 3.86179958 49 .078812236 Root MSE = .26113 ------------------------------------------------------------------------------ clowbrth | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cafdcprc | -.1760763 .0903733 -1.95 0.058 -.3582116 .006059 clphypc | 5.894509 2.816689 2.09 0.042 .2178453 11.57117 clbedspc | -1.576195 .8852111 -1.78 0.082 -3.36022 .2078308 clpcinc | -.8455268 1.356773 -0.62 0.536 -3.579924 1.88887 clpopul | 3.441116 2.872175 1.20 0.237 -2.347372 9.229604 _cons | .1060158 .3090664 0.34 0.733 -.5168667 .7288983 ------------------------------------------------------------------------------ . *First Difference Estimation with quadratic term of afdcprc; . reg clowbrth cafdcprc cafdcpsq clphypc clbedspc clpcinc clpopul; Source | SS df MS Number of obs = 50 -------------+------------------------------ F( 6, 43) = 2.39 Model | .964889165 6 .160814861 Prob > F = 0.0444 Residual | 2.89691041 43 .06737001 R-squared = 0.2499 -------------+------------------------------ Adj R-squared = 0.1452 Total | 3.86179958 49 .078812236 Root MSE = .25956 ------------------------------------------------------------------------------ clowbrth | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cafdcprc | -.5035049 .2791959 -1.80 0.078 -1.066557 .0595472 cafdcpsq | .0396094 .0319788 1.24 0.222 -.0248819 .1041008 clphypc | 6.620885 2.860505 2.31 0.025 .8521271 12.38964 clbedspc | -1.407963 .8903074 -1.58 0.121 -3.203439 .3875124 clpcinc | -.9987865 1.354276 -0.74 0.465 -3.729945 1.732372 clpopul | 4.429026 2.964218 1.49 0.142 -1.54889 10.40694 _cons | .1245915 .3075731 0.41 0.687 -.4956887 .7448718 ------------------------------------------------------------------------------ . *Calculation of turning point; . di -_b[cafdcprc]/(2*_b[cafdcpsq]); 6.3558685 . log close; log: C:\stataproject\micrometrics\hw6\hw6.log log type: text closed on: 12 Nov 2002, 19:40:14 ------------------------------------------------------------------------------------------------------------------------------------