我使用李子奈的3.2节中的数据
,比较异方差检验的BP检验和WHITE检验,
结果发现BP检验如果使用拟合值,则结果与white检验相反,
但使用原始值时结果与WHITE检验相同,哪位解释下,在此先谢过?附件是数据。以下是我做的过程。
**例题3.2.2城镇居民2006年的消费支出Y对人均可支配收入X1和
*** 其前一年的人均消费X2的回归。X2表示消费惯性。
regress y x1 x2 //做y对X1和X2的回归
estat hettest //异方差的BP检验
. estat hettest, normal /*B-P检验的原意,同方差假设*/
Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
Ho: Constant variance
Variables: fitted values of y
chi2(1) = 0.23
Prob > chi2 = 0.6348
estat imtest, white //WHITE TEST
White's test for Ho: homoskedasticity
against Ha: unrestricted heteroskedasticity
chi2(5) = 25.31
Prob > chi2 = 0.0001
Cameron & Trivedi's decomposition of IM-test
---------------------------------------------------
Source | chi2 df p
---------------------+-----------------------------
Heteroskedasticity | 25.31 5 0.0001
Skewness | 21.37 2 0.0000
Kurtosis | 0.47 1 0.4928
---------------------+-----------------------------
Total | 47.15 8 0.0000
---------------------------------------------------
上述结论表明两者检验结果相反。
但使用伍德里奇介绍的原理来做bp检验时结果与white检验相同。
predict e,resid
gen e2=e*e
reg e2 x1 x2
dis "BP=" e(N)*e(r2) //BP TEST