------------------------------------------------------------------------------- log: d:\courses\ps552\examples\houses.log log type: text opened on: 19 Apr 2004, 15:39:40 . . *********************************************************** . * . * Heteroscedasticity Example using house appraisals . * . * Bert Kritzer . * Revised April 19, 2004 . * . *********************************************************** . . drop _all . . use "D:\COURSES\PS552\EXAMPLES\Hetero Example (Houses).dta", clear . do d:\courses\ps552\examples\hetreg.sta . reg sp ft dm y95 area Source | SS df MS Number of obs = 53 -------------+------------------------------ F( 4, 48) = 13.93 Model | 4.0493e+10 4 1.0123e+10 Prob > F = 0.0000 Residual | 3.4887e+10 48 726810459 R-squared = 0.5372 -------------+------------------------------ Adj R-squared = 0.4986 Total | 7.5380e+10 52 1.4496e+09 Root MSE = 26959 ------------------------------------------------------------------------------ sp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- ft | 63.2098 12.997 4.86 0.000 37.07759 89.34201 dm | -90.66597 89.37635 -1.01 0.315 -270.3692 89.03722 y95 | -3208.467 7803.514 -0.41 0.683 -18898.48 12481.55 area | 14215.39 9924.464 1.43 0.159 -5739.087 34169.86 _cons | 49634.13 21501.17 2.31 0.025 6403.136 92865.13 ------------------------------------------------------------------------------ . predict resid,resid . twoway (scatter resid ft), title(Heteroscedasticity Check) . gen sp1=sp/ft . gen ft1=1/ft . gen dm1=dm/ft . gen y951=y95/ft . gen area1=area/ft . . reg sp1 ft1 dm1 y951 area1 Source | SS df MS Number of obs = 53 -------------+------------------------------ F( 4, 48) = 2.54 Model | 1783.4256 4 445.856401 Prob > F = 0.0520 Residual | 8433.71238 48 175.702341 R-squared = 0.1746 -------------+------------------------------ Adj R-squared = 0.1058 Total | 10217.138 52 196.483423 Root MSE = 13.255 ------------------------------------------------------------------------------ sp1 | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- ft1 | 53861.55 19508.56 2.76 0.008 14636.97 93086.13 dm1 | -126.613 85.60696 -1.48 0.146 -298.7373 45.51136 y951 | 1616.095 6784.522 0.24 0.813 -12025.1 15257.29 area1 | 12340.45 8449.11 1.46 0.151 -4647.626 29328.52 _cons | 60.86557 12.22748 4.98 0.000 36.28057 85.45057 ------------------------------------------------------------------------------ . . reg sp ft dm y95 area,robust Regression with robust standard errors Number of obs = 53 F( 4, 48) = 13.59 Prob > F = 0.0000 R-squared = 0.5372 Root MSE = 26959 ------------------------------------------------------------------------------ | Robust sp | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- ft | 63.2098 13.28488 4.76 0.000 36.49876 89.92085 dm | -90.66597 96.24954 -0.94 0.351 -284.1886 102.8567 y95 | -3208.467 7436.926 -0.43 0.668 -18161.41 11744.47 area | 14215.39 7903.35 1.80 0.078 -1675.364 30106.13 _cons | 49634.13 20716.61 2.40 0.021 7980.59 91287.67 ------------------------------------------------------------------------------ . . ml model lf hetreg (slopes:sp=ft dm y95 area)(variance: ft) . ml max initial: log likelihood = -8.303e+11 alternative: log likelihood = -5.036e+11 rescale: log likelihood = -848.01051 rescale eq: log likelihood = -848.00107 Iteration 0: log likelihood = -848.00107 (not concave) Iteration 1: log likelihood = -601.28286 Iteration 2: log likelihood = -578.04906 Iteration 3: log likelihood = -566.52205 Iteration 4: log likelihood = -564.14591 Iteration 5: log likelihood = -557.51797 Iteration 6: log likelihood = -556.81555 Iteration 7: log likelihood = -556.80503 Iteration 8: log likelihood = -556.80502 Number of obs = 53 Wald chi2(4) = 63.18 Log likelihood = -556.80502 Prob > chi2 = 0.0000 ------------------------------------------------------------------------------ sp | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- slopes | ft | 56.61924 11.60517 4.88 0.000 33.87351 79.36496 dm | -155.4288 73.97031 -2.10 0.036 -300.408 -10.44968 y95 | 5356.584 5431.509 0.99 0.324 -5288.978 16002.15 area | 11434.16 6691.629 1.71 0.088 -1681.194 24549.51 _cons | 60155.32 17935.9 3.35 0.001 25001.59 95309.05 -------------+---------------------------------------------------------------- variance | ft | .0025077 .000601 4.17 0.000 .0013298 .0036857 _cons | 15.29527 1.14687 13.34 0.000 13.04744 17.54309 ------------------------------------------------------------------------------ .