Tuesday, October 11, 2011
This is sort of an old question, but can you do fixed effects with an unbalanced panel?
Suppose the panel is only 2 observations per ith person, so some people have 2 observations, but some only have 1. I should look inside the .ado..but?
I believe you can do fixed effects with an unbalanced panel, but it gets trickier if you have only 1 observation. That observation should be dropped. Stata still uses that observation to calculate the standard errors.
Of course there maybe some corrections you can do for unbalanced panel, but I have never gotten any hell for it.
I second that. No problems at all running fe with anunbalanced panel, though you certainly have to correct for it in the standard errors. some options for that: Huber-White sandwich estimator, clustering (see C&T for a nice description of unbalanced panels and clustering), or bootstrap. in the panel where some people have only one observation, those observations are dropped from the estimation -- essentially when you do the mean differencing the values for that observation all turn into zeros. I do not know about the standard error, but I trust Asif on that one (Responder 1, How does it do that?).
This page http://www.stata.com/support/faqs/stat/xtreg2.html has the description of what Stata estimates when you add the "fe" extension to the end of your command line.
Ha ha. I honestly dont know. If I were to guess, when it calculates the variance -covariane matrix, it uses the whole sample (inluding the singleton observations), essentially making use of more observations. This is why your total no. of observations when your xtreg, fe remains the same with xtreg, re (random effects) despite singleton values.