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

Re: st: fixed effects & autocorrelation& heteroskedasticity

From   "Antonio Rodrigues Andres" <>
To   <>
Subject   Re: st: fixed effects & autocorrelation& heteroskedasticity
Date   Tue, 25 May 2004 23:38:47 +0200

Thanks Cordula

I tried 
xtgls y x1 x2 x3, force p(corr)
but it appears the message 
panels must be balanced

what is wrong?

>>> 05/25/04 7:37 PM >>>

There's also a command -xtserial- testing for first-order
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
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 <> 

> I have a doubt on panel data. First, I have some prior beliefs that
> of the explanatory variables are correlated with some indivvidual
> specific effects. I use the Hausman test which indicates that the
> 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
> 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
> 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
> Toni
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

*   For searches and help try:

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