Tips 145:回归经典假设的检验regcheck
| 分类: 回归——线性模型 |
【问题】
刚学习计量的时候,一般都有异方差、多重共线性、正态分布等等假设。
当然后来慢慢就知道,除了内生性,其他很少人会care。
但是,初学者还是想检验一下这些假设的,尤其适和课程作业时候。
一个一个检验的命令都有,但是比较麻烦,现在只需要一秒钟。。。
1) The assumption of homoskedasticity is examined using the Breusch-Pagan test (Gujarati, 2012, pp. 86-87). Since the Ho:homoskedastic residuals, p-value < 0.05 would show that there is a heterokedasticity problem in the model.
2) The assumption of no severe multicollinearity is examined using VIF (Variance Inflation Factor)-values. A VIF value above 5.0 is used as a sign of severe multicollinearity in the model (Studenmund, 2006, p.271).
3) The
assumption of normally-distributed residuals is examined
using Shapiro-Wilk W test. Since the Ho:residuals are normmally
distributed, p-value < 0.01 would indicate that residuals are
not normally distributed. The reason why I propose 0.01 as a cutoff
is that in almost every case, we reject the Ho at 0.05. Further,
Shapiro-Wilk W test is, like any other, sensitive to large sample
sizes. I still suggest that one additionnaly examines the residual
plots.
4) The assumption of correctly specified model is examined using the linktest (Stata Manual, pp. 1041-1044). A statistically significant _hatsq (p < 0.05) would show a specification problem.
5) The assumption of appropriate functional form is examined using Ramsey's regression specification error test (RESET) (Wooldridge, pp. 303-305). Since the Ho: appropriate functional form, p-value < 0.05 would indicate a functional form problem.
6) Influence
is based on both leverage and the extent to which the observation
is an outlier. Cook's distance (D) is used to locate any
influential observations. An observation with D > 1 would often
be considered
【方法】
regcheck
安装:ssc install regcheck,replace
【例子】

加载中…