Statalist


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

Re: st: unbalanced panel


From   "Austin Nichols" <[email protected]>
To   [email protected]
Subject   Re: st: unbalanced panel
Date   Tue, 8 Jan 2008 08:50:58 -0500

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/



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