Solved – Is it possible to use the Breusch-Pagan Lagrange multiplier test (xttest0) in Stata for unbalanced data

breusch-paganmodel selectionpoolingrandom-effects-modelstata

Is it possible to use xttest0 in Stata with unbalanced panel data? I want to test whether the I should use pooled OLS or random effects estimation.

What does this test actually do?

Best Answer

The null hypothesis in Stata's xttest0 command is that the variance of the unobserved fixed effects is zero, i.e. var(u) = 0. Rejecting this hypothesis means that pooled OLS might not be the appropriate model given that it assumes an error structure $\sigma^2 I_{NT}$. If you have unbalanced panel data you can perform the Breusch-Pagan LM test with the xttest1 command. For a description and more information on this command type

net install sg164_1.pkg
help xttest1

If you want to test whether you should use fixed effects or random effects, you will have to check this with the Hausman test. You can perform this test with the hausman command or, if you have used robust or cluster robust errors, with xtoverid. For the latter command see the help file which includes at the bottom an example of how to test fixed versus random effects.