用stata如何检验panel的自相关和异方差 | ||
Question: 用stata如何检验panel的自相关和异方差??hettest, szroeter 等只能用在regress之后,不能用于xtreg.如果stata没有这方面的功能,eviews有的话,那就说说如何在eviews中实现对panel的自相关和异方差检验吧? Answer: A) Test heteroskedasticity. We can use the fact that iterated GLS=MLE (Refer to most of standard textbooks). Try the following codes. xtgls y x, panel(heteroskedastic) igls estimates store igls xtgls y x local df=e(N_g)-1 lrtest igls . , df(`df') B) Test autocorrelation. You can NOT use the fact given above. Since you can easily see after you write down the likelihood functioin, GLS does not accout for 1/2*(1+rho), (where rho is the correlation for AR(1) model) . However, you can use the following code. xtserial y x |