# Heteroskedasticity removed through fixed effect estimation?

I have a large panel data set. Examination of a pooled OLS regression with Breusch Pagan showed heteroskedasticity with all model specifications. I consequently chose to use panel-corrected standard error parameter estimates (PCSE, after Beck and Katz, 1996).

Nonetheless, I decided to test the robustness of my model against one with (country) fixed effects. Now, at least in Stata, the Hausman test doesn't work with robust standard errors. Since it looks at the coefficients, not the standard deviation, though, I can use the FE with uncorrected standard errors without problems for the Hausman test.

My question is, though, whether there is any reason to assume that the FE model's error term might not be heteroskedastic. That is, is it necessary to perform another Breusch Pagan test on the FE model, even though I know from the Pooled OLS that there is heteroskedasticity? I'd rather just run the Hausman test on the uncorrected FE and the PCSE model, then report the corrected FE together with the PCSE model in my appendix. The reason being that Stata is a little sturdy when it comes to postestimation tests after xtreg, i.e. the FE estimations.

-
The xtoverid command allows you to perform a Hausman test with robust or clustered standard errors. Google "xtoverid Hausman" to find some useful examples, mainly on Statalist. –  Andy May 9 at 9:56
I looked into that yesterday too, but Stata always returns "xtoverid not compatible with xtreg model fe" for me. Either way, the Hausman test doesn't take standard errors into account as far as I see it. Still not sure about heteroskedasticity in FEs though. –  altabq May 9 at 10:12
The Hausman test is based on the standard errors of your comparison models (see here). I've never seen this kind of error with xtoverid and it should work because at the bottom of the help file of the command there is an example of how to use it in order to compare FE and RE models. –  Andy May 9 at 10:23
You're right, I misunderstood the formula. I'll look at the help files again to see where I went wrong in Stata. Thanks! –  altabq May 9 at 12:02

The model underlying the FE-estimator in its simplest form can be written as $$y_{i,t}=x_{i,t}\beta +\alpha_i + u_{i,t},$$ where we now for simplicity assume $u_{i,t}$ is iid. If you fit a model given by $$y_{i,t}=x_{i,t}\beta +e_{i,t}$$ using pooled OLS and data is generated by the fixed effects model, you have in effect set $e_{i,t} = \alpha_i + u_{i,t}$. Decompose the variance of the error term in the pooled OLS model to get: $$\operatorname{Var}(e_{i,t})=\operatorname{Cov}(\alpha_i + u_{i,t},\alpha_i + u_{i,t})=\operatorname{Var}(\alpha_i)+\operatorname{Var}(u_{i,t})+2\operatorname{Cov}(\alpha_i,u_{i,t}).$$ From this equation it is quite clear that while $u_{i,t}$ is of constant variance (it is even iid), $e_{i,t}$ can very well have non-constant variance. Therefore, evidence of an heteroscedastic error term in the pooled OLS regression is in general not evidence of an heteroscedastic error term in the fixed effects regression.