Pedro Juan Garcia Teruel <[email protected]>:
There are several ways to make a panel dataset balanced, and none are
a particularly good idea. You can drop time periods where few
individuals are observed, or drop individuals where few time periods
are observed, or you can do some combination of these, iterating until
you have a balanced panel.
For example,
webuse nlswork
tsset
xtdes
shows you that you can keep the 86 of the 4711 obs observed in every
year. Or you could keep 929 obs with data from the last five periods
like so:
tab year
keep if year>81
egen n=count(year), by(id)
keep if n==5
but you may still have missing data on individual variables. Why do
you need a balanced panel?
On Jan 8, 2008 8:25 AM, Pedro Juan Garcia Teruel <[email protected]> wrote:
> Dear all,
> I have a unbalanced panel data set and I am interesting in transforming
> it in a balanced panel.
> Is there any way?
*
* 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/