sacrificial toaster oven
Olga wrote
I have unbalanced panel data (unequal time series for
observations, but no
missing observations)
Dataset contains variables on farms from 1980 to 1996.
Not all years are
present for each farm.
I would like to test it for selection bias by means of
Hausman test.
Therefore if I understand correctly I have to obtain
two models: balanced
and unbalanced.
My question is how can I obtain balanced sub-panel in
this situation?
egen nfarm = count(farm),by(year)
summarize nfarm, meanonly
by year: keep if nfarm == `r(max)'
Kit Baum, Boston College Economics and DIW Berlin
http://ideas.repec.org/e/pba1.html
An Introduction to Modern Econometrics Using Stata:
http://www.stata-press.com/books/imeus.html
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/