Chap 8 AE
Chap 8 AE
Chap 8 AE
Economics 101 (Trường Đại học Kinh tế Thành phố Hồ Chí Minh)
1. Use the data in HPRICE1 to obtain the heteroskedasticity-robust standard errors for
equation (8.17).
i. Discuss any important differences with the usual standard errors.
. reg price lotsize sqrft bdrms
Robust
price Coef. Std. Err. t P>|t| [95% Conf. Interval]
The robust standard error on lotsize is almost twice as large as the usual standard
error, making lotsize much less significant (the t statistic falls from about 3.23 to
1.65). The t statistic on sqrft also falls, but it is still very significant. The variable
bdrms actually becomes somewhat more significant, but it is still barely significant.
The most important change is in the significance of lotsize.
Robust
lprice Coef. Std. Err. t P>|t| [95% Conf. Interval]
iii. What does this example suggest about heteroskedasticity and the transformation used
for the dependent variable?
2. Apply the full White test for heteroskedasticity [see equation (8.19)] to equation (8.18).
Using the chisquare form of the statistic, obtain the p-value. What do you conclude?
Solution 1:
After estimating equation (8.18), we obtain the squared OLS residuals û 2 . The full-
blown White test is based on the R-squared from the auxiliary regression (with an
intercept),
where “l ” in front of lotsize and sqrft denotes the natural log. [See equation (8.19).]
With 88 observations the n-R-squared version of the White statistic is 88(.109)
9.59, and this is the outcome of an (approximately) 92 random variable. The p-
value is about .385, which provides little evidence against the homoskedasticity
assumption.
gen llotsize_lsqrft=llotsize*lsqrft
gen llotsize_bdrms=llotsize*bdrms
gen lsqrft_bdrms=lsqrft*bdrms
predict uhat, re
gen uhatsq=uhat^2
reg uhatsq llotsize lsqrft bdrms llotsizesq lsqrftsq bdrmssq llotsize_lsqrft llotsize_bdrms
lsqrft_bdrms
. reg uhatsq llotsize lsqrft bdrms llotsizesq lsqrftsq bdrmssq llotsize_lsqrft llotsize_bdrms lsq
> rft_bdrms
Solution 2:
. estat imtest, white
chi2(9) = 9.55
Prob > chi2 = 0.3882
Source chi2 df p
Since the value of Prob > chi2 = 0.3882 that is larger than 5%, we fail to reject two-
sided alternative H0: homoscedasticity at the 5% level.
3. In Example 7.12, we estimated a linear probability model for whether a young man was
arrested during 1986:
i. Using the data in CRIME1, estimate this model by OLS and verify that all fitted
values are strictly between zero and one. What are the smallest and largest fitted
values?
Let arr86 be a binary variable equal to unity if a man was arrested during 1986, and
zero otherwise.
. reg arr86 pcnv avgsen tottime ptime86 qemp86
. predict fitted
(option xb assumed; fitted values)
. sum fitted
The estimates are given in equation (7.31). Rounded to four decimal places, the
smallest fitted value is 0.0066 and the largest fitted value is 0.5577.
ii. Estimate the equation by weighted least squares, as discussed in Section 8-5.
. gen weight=1/h
hˆi arr86 i (1 arr86 i ) , which is strictly between zero and one because 0 < arr86 i < 1
for all i. The weights for WLS are 1/ hˆi . To show the WLS estimate of each
parameter, we report the WLS results using the same equation format as for OLS:
The coefficients on the significant explanatory variables are very similar to the OLS
estimates. The WLS standard errors on the slope coefficients are generally lower
than the nonrobust OLS standard errors. A proper comparison would be with the
robust OLS standard errors.
iii. Use the WLS estimates to determine whether avgsen and tottime are jointly
significant at the 5% level.
. test avgsen==tottime==0
( 1) avgsen - tottime = 0
( 2) avgsen = 0
F( 2, 2719) = 0.88
Prob > F = 0.4129
After WLS estimation, the F statistic for joint significance of avgsen and tottime,
with 2 and 2,719 df, is about 0.88 with p-value 0.41. They are not close to being
jointly significant at the 5% level. If your econometrics package has a command for
WLS and a test command for joint hypotheses, the F statistic and p-value are easy to
obtain. Alternatively, you can obtain the restricted R-squared using the same
weights as in part (ii) and dropping avgsen and tottime from the WLS estimation.
(The unrestricted R-squared is .0744.)