Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: RE: Converting unbalanced panel to balanced panel data
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: RE: Converting unbalanced panel to balanced panel data
Date
Tue, 15 Mar 2011 18:46:00 +0000
Not quite; this won't automatically produce balance in my understanding of that term.
You can have the same number of years in two or more incomplete panels but they could be different years.
Rather, the poster has to say which balance he wants in terms of the trade-off between #panels and #years.
Nick
[email protected]
Jan Bryla
If you want to drop observations that are not present in all years of your study, generate an indicator for number of observations by pid, such as
Bys pid: gen nyear=[_N]
Keep if nyear==9
Muhammad Anees
I know I can apply most of the panel data estimations to balanced and
unbalanced panel dataset. Instead of this I would like you all to help
me out of this.
I have one very basic question in mind and came to no clue after
intensive research of the Stata help files and over the internet. I
have an unbalanced panel dataset and want to make it balanced. I would
present the xtdes results at the end of my email please bear my my
question first: How can I keep if all my id is present at all times so
that I come with atleast balanced panel?
xtdes
pid: 10016848, 10016872, ..., 1.794e+08 n = 16368
year: 2001, 2002, ..., 2009 T = 9
Delta(year) = 1 unit
Span(year) = 9 periods
(pid*year uniquely identifies each observation)
Distribution of T_i: min 5% 25% 50% 75% 95% max
1 1 2 6 9 9
9
Freq. Percent Cum. Pattern
---------------------------+-----------
5110 31.22 31.22 111111111
1450 8.86 40.08 ..1111111
1187 7.25 47.33 11.......
616 3.76 51.09 1........
486 2.97 54.06 ........1
423 2.58 56.65 .11111111
410 2.50 59.15 ......111
382 2.33 61.49 .......11
352 2.15 63.64 ..1......
5952 36.36 100.00 (other patterns)
---------------------------+-----------
16368 100.00 XXXXXXXXX
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/