------------------------------------------------------------------------------- log: A:\class18.log log type: text opened on: 12 Nov 2002, 12:55:20 . use a:\class18.dta . summarize Variable | Obs Mean Std. Dev. Min Max -------------+----------------------------------------------------- size | 100 4.35 1.493251 2 10 earns | 100 7.911 5.129704 .75 30 income | 100 9.94124 5.583998 .75 32.08 wealth | 100 12.63536 16.81237 .05 98.033 saving | 100 1.86691 4.447998 -5.577 31.599 id | 100 50.5 29.01149 1 100 . regress saving income wealth Source | SS df MS Number of obs = 100 -------------+------------------------------ F( 2, 97) = 8.07 Model | 279.445984 2 139.722992 Prob > F = 0.0006 Residual | 1679.23772 97 17.311729 R-squared = 0.1427 -------------+------------------------------ Adj R-squared = 0.1250 Total | 1958.6837 99 19.7846839 Root MSE = 4.1607 ------------------------------------------------------------------------------ saving | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .3500154 .1011997 3.46 0.001 .1491621 .5508687 wealth | -.0273428 .0336121 -0.81 0.418 -.0940535 .0393678 _cons | -1.267191 .8892972 -1.42 0.157 -3.0322 .4978178 ------------------------------------------------------------------------------ . generate x1s = income^2 . generate x2s = wealth^2 . generate x1x2 = income*wealth . hettest income wealth x1s x2s x1x2 Cook-Weisberg test for heteroskedasticity using variables specified Ho: Constant variance chi2(5) = 301.08 Prob > chi2 = 0.0000 . hettest Cook-Weisberg test for heteroskedasticity using fitted values of saving Ho: Constant variance chi2(1) = 109.83 Prob > chi2 = 0.0000 . regress saving income wealth, robust Regression with robust standard errors Number of obs = 100 F( 2, 97) = 2.47 Prob > F = 0.0897 R-squared = 0.1427 Root MSE = 4.1607 ------------------------------------------------------------------------------ | Robust saving | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- income | .3500154 .2432482 1.44 0.153 -.1327649 .8327958 wealth | -.0273428 .061659 -0.44 0.658 -.1497189 .0950333 _cons | -1.267191 1.53312 -0.83 0.411 -4.31001 1.775628 ------------------------------------------------------------------------------ . log close log: A:\class18.log log type: text closed on: 12 Nov 2002, 12:58:03 -------------------------------------------------------------------------------