Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: balanced sub-panel to test for selection bias


From   Kit Baum <baum@bc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: balanced sub-panel to test for selection bias
Date   Wed, 23 May 2007 09:52:45 -0400

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/



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