Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: fixed effects & autocorrelation& heteroskedasticity

From   Cordula Stolberg <>
Subject   Re: st: fixed effects & autocorrelation& heteroskedasticity
Date   Tue, 25 May 2004 18:37:53 +0100


There's also a command -xtserial- testing for first-order autocorrelation with panel data. You should get it from

findit xtserial

To test for heteroskedasticity, there's also a "helpfile" online at


If you then use xtgls and you have heteroskedasticity & autocorrelation, you can correct for both with xtgls, using either panels (corr) or corr(ar1) -whichever is appropriate- and panels(heteroskedastic)to correct for heteroskedasticity. If you have an unbalanced panel, you need to use the force option, i.e.

xtgls..., force...

Hope this helps.


--On 25 May 2004 18:43 +0200 Antonio Rodrigues Andres <> wrote:

I have a doubt on panel data. First, I have some prior beliefs that some
of the explanatory variables are correlated with some indivvidual
specific effects. I use the Hausman test which indicates that the fixed
effects model is more appropriate than random effects.

My next step was to check autocorrelation in the fixed effects model.
For that, I use the command xtregar, fe which already corrects for ar(1)
in the error term. I got low values of the BFN and high rhos (0.85,
0.90). This indicates the presence of autocorrelation. To check the
problem of heteroskedasticity in the fixed effects model, i just use the
command xttest3. I reject the null hypothesis and therefore there is
groupwise het.

Now , I dont know how to proceed. I should type

xtgls dep.var inde.var, panel(corr)
This would account for heteroskedasticy and autocorrelation?

If this were correct, the problem is that my panel is unbalanced and
xtgls doesnt allow unbalanced panels

Any suggestion
*   For searches and help try:

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index