. use "D:\Courses\grad econometrics\homework\BWGHT.DTA" . des Contains data from D:\Courses\grad econometrics\homework\BWGHT.DTA obs: 1,388 vars: 14 3 Jun 1997 13:47 size: 55,520 (99.5% of memory free) ------------------------------------------------------------------------------- storage display value variable name type format label variable label ------------------------------------------------------------------------------- faminc float %9.0g 1988 family income, $1000s cigtax float %9.0g cig. tax in home state, 1988 cigprice float %9.0g cig. price in home state, 1988 bwght int %8.0g birth weight, ounces fatheduc byte %8.0g father's yrs of educ motheduc byte %8.0g mother's yrs of educ parity byte %8.0g birth order of child male byte %8.0g =1 if male child white byte %8.0g =1 if white cigs byte %8.0g cigs smked per day while preg lbwght float %9.0g log of bwght bwghtlbs float %9.0g birth weight, pounds packs float %9.0g packs smked per day while preg lfaminc float %9.0g log(faminc) ------------------------------------------------------------------------------- Sorted by: . sum Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- faminc | 1388 29.02666 18.73928 .5 65 cigtax | 1388 19.55295 7.795598 2 38 cigprice | 1388 130.559 10.24448 103.8 152.5 bwght | 1388 118.6996 20.35396 23 271 fatheduc | 1192 13.18624 2.745985 1 18 -------------+-------------------------------------------------------- motheduc | 1387 12.93583 2.376728 2 18 parity | 1388 1.632565 .8940273 1 6 male | 1388 .5208934 .4997433 0 1 white | 1388 .7845821 .4112601 0 1 cigs | 1388 2.087176 5.972688 0 50 -------------+-------------------------------------------------------- lbwght | 1388 4.760031 .1906622 3.135494 5.602119 bwghtlbs | 1388 7.418723 1.272123 1.4375 16.9375 packs | 1388 .1043588 .2986344 0 2.5 lfaminc | 1388 3.071271 .9180645 -.6931472 4.174387 . **Note that there are missing observations for motheduc and fatheduc. . **Run w/ observations that you will have for the auxillary regression . **Always a good idea to describe and summarize your data before beginning! . reg bwght cigs parity faminc if motheduc~=. & fatheduc~=. Source | SS df MS Number of obs = 1191 -------------+------------------------------ F( 3, 1187) = 14.95 Model | 17579.8997 3 5859.96658 Prob > F = 0.0000 Residual | 465166.792 1187 391.884408 R-squared = 0.0364 -------------+------------------------------ Adj R-squared = 0.0340 Total | 482746.692 1190 405.669489 Root MSE = 19.796 ------------------------------------------------------------------------------ bwght | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cigs | -.5978519 .1087701 -5.50 0.000 -.8112549 -.3844489 parity | 1.832274 .6575402 2.79 0.005 .5422035 3.122345 faminc | .0670618 .0323938 2.07 0.039 .0035063 .1306173 _cons | 115.4699 1.655898 69.73 0.000 112.2211 118.7187 ------------------------------------------------------------------------------ . **Note that n=1191 . predict u, resid . reg u cigs parity faminc motheduc fatheduc Source | SS df MS Number of obs = 1191 -------------+------------------------------ F( 5, 1185) = 0.57 Model | 1125.65702 5 225.131404 Prob > F = 0.7193 Residual | 464041.134 1185 391.595894 R-squared = 0.0024 -------------+------------------------------ Adj R-squared = -0.0018 Total | 465166.791 1190 390.896463 Root MSE = 19.789 ------------------------------------------------------------------------------ u | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- cigs | .0019157 .1103479 0.02 0.986 -.2145833 .2184146 parity | -.0446706 .6594055 -0.07 0.946 -1.338403 1.249062 faminc | -.0110204 .0365616 -0.30 0.763 -.0827531 .0607124 motheduc | -.3704503 .3198551 -1.16 0.247 -.9979957 .2570951 fatheduc | .4723944 .2826433 1.67 0.095 -.0821426 1.026932 _cons | -.9455971 3.728453 -0.25 0.800 -8.260702 6.369508 ------------------------------------------------------------------------------ . **Calculate the Chi-2 statistic . display .0024*1191 2.8584 .***Can also automate using .*** display _N*e(r2) . display 1-chi2(2,2.8584) .23950045 . **Use Stata to look up the p-value . **Chi-2 for 2 degrees of freedom because had 2 variables were testing . test fatheduc motheduc ( 1) fatheduc = 0 ( 2) motheduc = 0 F( 2, 1185) = 1.44 Prob > F = 0.2380 . **Note that the LM test is quite close to the F test . log close log: D:\Courses\grad econometrics\homework\VOTE1.log log type: text closed on: 28 Jan 2009, 10:34:30 ------------------------------------------------------------------------------------------