I watched this video on how to check for heteroskedasticity using Stata, and it helped me a lot. But the data example in the video was time series data.

He used the Bruesh-Pagan test.

hettest dependntvar1 dependvar2 dependvar3 ... dv6

And the output was like

Breusch-Pagan / Cook-Weisberg test for heteroskedasticity 
     Ho: Constant variance
     Variables: dependntvar1 dependvar2 dependvar3 ... dv6

     chi2(6)     =  86.56
     Prob > chi2  =   0.0000

The Ho had a p-value of 0.0000 so it had heteroskedasticity.

Does it work the same for panel data?

If not, how do I test for heteroskedasticity on panel data?

  • $\begingroup$ In stata, you can test for heteroskedasticity of panel data specifically. The following link may help. stata.com/support/faqs/statistics/… $\endgroup$ – DornerA Mar 25 '16 at 13:03
  • $\begingroup$ @DornerA, yeah that was very helpful, thank you. But a little too technical for me to fully digest it. Is there dumbed-down explanation somewhere? Or one with pictures/graphs? maybe that would help even more. $\endgroup$ – user4207 Mar 26 '16 at 0:28

You can regress residual squares (from RE or FE depending on your estimation) on $X_{it} \hat\beta$ and its square using the clustered standard errors (the vce(cl id) option), and read the F statistic and the associated p value. This is basically the same as Het test for cross sectional models (White's simplified test).

xtreg y x1 x2, re
predict uhat, ue
predict xb, xb
gen uhatsq = uhat^2
reg uhatsq c.xb##c.xb, vce(cl id)
testparm c.xb##c.xb

Another test is for groupwise heteroskedasticity proposed by Greene (2000). This test assumes that the variance of the error term is $\sigma_i^2$ (no heteroskedasticity over $t$) and then test whether $\sigma_i^2$ is the same for all $i$. You can do it using the xttest3 module. The xttest3 manual says:

In terms of small sample properties, simulations of the test statistic have shown that its power is very low in the context of fixed effects with "large N, small T" panels. In that circumstance, the test should be used with caution.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy