------------------------------------------------------------------------------------------ log: C:\data\econ771_January_31_2008.log log type: text opened on: 31 Jan 2008, 10:08:20 . regress y x Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 1, 498) = 901.89 Model | 1011.33993 1 1011.33993 Prob > F = 0.0000 Residual | 558.437558 498 1.12136056 R-squared = 0.6443 -------------+------------------------------ Adj R-squared = 0.6435 Total | 1569.77749 499 3.14584667 Root MSE = 1.0589 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | 1.400116 .0466217 30.03 0.000 1.308517 1.491716 _cons | 1.025666 .0473691 21.65 0.000 .9325983 1.118734 ------------------------------------------------------------------------------ . drop error . predict error,resid . twoway(error x) error is not a twoway plot type r(198); . twoway(scatter error x) . drop error . regress y2 x Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 1, 498) = 1086.78 Model | 1127.75519 1 1127.75519 Prob > F = 0.0000 Residual | 516.774117 498 1.03769903 R-squared = 0.6858 -------------+------------------------------ Adj R-squared = 0.6851 Total | 1644.52931 499 3.29564992 Root MSE = 1.0187 ------------------------------------------------------------------------------ y2 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x | 1.478505 .0448488 32.97 0.000 1.390389 1.566622 _cons | 1.104813 .0455678 24.25 0.000 1.015284 1.194341 ------------------------------------------------------------------------------ . predict error,resid . twoway(scatter error x) . drop error . regress y3 x2 Source | SS df MS Number of obs = 500 -------------+------------------------------ F( 1, 498) = 120.78 Model | 151.308798 1 151.308798 Prob > F = 0.0000 Residual | 623.852074 498 1.25271501 R-squared = 0.1952 -------------+------------------------------ Adj R-squared = 0.1936 Total | 775.160872 499 1.5534286 Root MSE = 1.1192 ------------------------------------------------------------------------------ y3 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x2 | .9235915 .0840377 10.99 0.000 .7584794 1.088704 _cons | 1.065843 .0982553 10.85 0.000 .8727964 1.258889 ------------------------------------------------------------------------------ . predict error,resid . twoway(scatter error x) . twoway(scatter error x2) . use "C:\drive\econ276\bweight.dta", clear . regress bw urban mothage motgrd fatgrd moheight sexchild Source | SS df MS Number of obs = 3022 -------------+------------------------------ F( 6, 3015) = 31.17 Model | 33818026.6 6 5636337.76 Prob > F = 0.0000 Residual | 545194469 3015 180827.353 R-squared = 0.0584 -------------+------------------------------ Adj R-squared = 0.0565 Total | 579012496 3021 191662.528 Root MSE = 425.24 ------------------------------------------------------------------------------ bw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- urban | 44.83656 18.97039 2.36 0.018 7.640344 82.03278 mothage | 8.336102 1.308374 6.37 0.000 5.770706 10.9015 motgrd | 1.01773 2.475676 0.41 0.681 -3.836454 5.871914 fatgrd | -.0894796 .033671 -2.66 0.008 -.1555 -.0234592 moheight | 16.27195 1.576277 10.32 0.000 13.18127 19.36264 sexchild | 41.32084 15.51006 2.66 0.008 10.90948 71.73221 _cons | 265.2228 235.6662 1.13 0.261 -196.8599 727.3055 ------------------------------------------------------------------------------ . regress bw mothage motgrd fatgrd moheight sexchild if urban==1 Source | SS df MS Number of obs = 2310 -------------+------------------------------ F( 5, 2304) = 31.21 Model | 28941974.5 5 5788394.89 Prob > F = 0.0000 Residual | 427360015 2304 185486.118 R-squared = 0.0634 -------------+------------------------------ Adj R-squared = 0.0614 Total | 456301990 2309 197618.878 Root MSE = 430.68 ------------------------------------------------------------------------------ bw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mothage | 9.702226 1.551042 6.26 0.000 6.660641 12.74381 motgrd | 1.447974 2.770963 0.52 0.601 -3.985868 6.881817 fatgrd | -.1063191 .0378827 -2.81 0.005 -.1806069 -.0320313 moheight | 16.79576 1.808258 9.29 0.000 13.24977 20.34174 sexchild | 35.70426 17.97515 1.99 0.047 .4550996 70.95342 _cons | 196.6461 269.757 0.73 0.466 -332.3459 725.6381 ------------------------------------------------------------------------------ . regress bw mothage motgrd fatgrd moheight sexchild if urban==0 Source | SS df MS Number of obs = 712 -------------+------------------------------ F( 5, 706) = 5.84 Model | 4832718.98 5 966543.795 Prob > F = 0.0000 Residual | 116768984 706 165395.162 R-squared = 0.0397 -------------+------------------------------ Adj R-squared = 0.0329 Total | 121601703 711 171029.118 Root MSE = 406.69 ------------------------------------------------------------------------------ bw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- mothage | 4.382668 2.473442 1.77 0.077 -.4735135 9.23885 motgrd | -3.12643 5.702797 -0.55 0.584 -14.3229 8.070043 fatgrd | -.0186768 .0740096 -0.25 0.801 -.163982 .1266284 moheight | 14.34012 3.214037 4.46 0.000 8.02991 20.65034 sexchild | 59.60955 30.56618 1.95 0.052 -.4019408 119.621 _cons | 670.346 478.2961 1.40 0.161 -268.707 1609.399 ------------------------------------------------------------------------------ . di 185486.118/ 165395.162 1.1214725 . di Ftail(2304,706,1.12) .03340745 . regress bw urban mothage motgrd fatgrd moheight sexchild Source | SS df MS Number of obs = 3022 -------------+------------------------------ F( 6, 3015) = 31.17 Model | 33818026.6 6 5636337.76 Prob > F = 0.0000 Residual | 545194469 3015 180827.353 R-squared = 0.0584 -------------+------------------------------ Adj R-squared = 0.0565 Total | 579012496 3021 191662.528 Root MSE = 425.24 ------------------------------------------------------------------------------ bw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- urban | 44.83656 18.97039 2.36 0.018 7.640344 82.03278 mothage | 8.336102 1.308374 6.37 0.000 5.770706 10.9015 motgrd | 1.01773 2.475676 0.41 0.681 -3.836454 5.871914 fatgrd | -.0894796 .033671 -2.66 0.008 -.1555 -.0234592 moheight | 16.27195 1.576277 10.32 0.000 13.18127 19.36264 sexchild | 41.32084 15.51006 2.66 0.008 10.90948 71.73221 _cons | 265.2228 235.6662 1.13 0.261 -196.8599 727.3055 ------------------------------------------------------------------------------ . hettest Breusch-Pagan / Cook-Weisberg test for heteroskedasticity Ho: Constant variance Variables: fitted values of bw chi2(1) = 0.01 Prob > chi2 = 0.9161 . imtest Cameron & Trivedi's decomposition of IM-test --------------------------------------------------- Source | chi2 df p ---------------------+----------------------------- Heteroskedasticity | 37.93 25 0.0470 Skewness | 14.76 6 0.0222 Kurtosis | 10.01 1 0.0016 ---------------------+----------------------------- Total | 62.70 32 0.0009 --------------------------------------------------- . regress bw urban mothage motgrd fatgrd moheight sexchild Source | SS df MS Number of obs = 3022 -------------+------------------------------ F( 6, 3015) = 31.17 Model | 33818026.6 6 5636337.76 Prob > F = 0.0000 Residual | 545194469 3015 180827.353 R-squared = 0.0584 -------------+------------------------------ Adj R-squared = 0.0565 Total | 579012496 3021 191662.528 Root MSE = 425.24 ------------------------------------------------------------------------------ bw | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- urban | 44.83656 18.97039 2.36 0.018 7.640344 82.03278 mothage | 8.336102 1.308374 6.37 0.000 5.770706 10.9015 motgrd | 1.01773 2.475676 0.41 0.681 -3.836454 5.871914 fatgrd | -.0894796 .033671 -2.66 0.008 -.1555 -.0234592 moheight | 16.27195 1.576277 10.32 0.000 13.18127 19.36264 sexchild | 41.32084 15.51006 2.66 0.008 10.90948 71.73221 _cons | 265.2228 235.6662 1.13 0.261 -196.8599 727.3055 ------------------------------------------------------------------------------ . predict p_y (option xb assumed; fitted values) (247 missing values generated) . predict error,resid (305 missing values generated) . twoway (scatter error p_y) . log close log: C:\data\econ771_January_31_2008.log log type: text closed on: 31 Jan 2008, 10:43:09 ----------------------------------------------------------------------------------------