EDIT: I now realise that the xttest commands are not comparing FE and RE, but rather RE and OLS. Ignore this post, I apologise for the error.
Hi all. I am estimating a specification that regresses hours worked against the main independent variable LK, various controlling regressors, and year effects. I am using unbalanced panel data, and want to see which of the RE or FE estimators is more appropriate via a Hausman test. Due to the presence of serial correlation I am using clustered errors, so have been advised to use xttest commands. Because my panel is unbalanced, I am using xttest1.
Because the command is quite old, when including year effects I use the xi prefix:
I then use xttest1 and it works with no problems. However, I'd also like to estimate specifications with a lagged dependent variable. I generated the lagged dependent variable manually, and entered:
However, using xttest1 now gives:
I tried replacing i.year with manually created year dummies, but receive the same error message. I am assuming the issue is including a lagged dependent variable - does anyone have any advice on how to get round this? Thank you.
Hi all. I am estimating a specification that regresses hours worked against the main independent variable LK, various controlling regressors, and year effects. I am using unbalanced panel data, and want to see which of the RE or FE estimators is more appropriate via a Hausman test. Due to the presence of serial correlation I am using clustered errors, so have been advised to use xttest commands. Because my panel is unbalanced, I am using xttest1.
Because the command is quite old, when including year effects I use the xi prefix:
Code:
xi: xtreg hours LK CO PAU EP UB UD ALMP SM i.year, re cluster(CID)
Code:
xi: xtreg hours lagged_hours LK CO PAU EP UB UD ALMP SM i.year, re cluster(CID)
Code:
. xttest1 factor-variable and time-series operators not allowed r(101);
Comment