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]
Re: st: Unbalanced to Balanced panel
From
Muhammad Anees <[email protected]>
To
[email protected]
Subject
Re: st: Unbalanced to Balanced panel
Date
Tue, 8 Nov 2011 11:51:57 +0500
after you do your data xtset id year;
bys pid: gen nyear=[_N]
keep if nyear==K
where k is the number of years you want to keep data for and where
every individual is traced.
On Tue, Nov 8, 2011 at 11:08 AM, Vinod Mishra <[email protected]> wrote:
> Dear All,
>
> I am a new member to Statalist and this is my first post. I have been searching and using information from statalist from last few years. My question is as follows:
>
> I have an unbalanced panel data and I want to make it balanced, such that I am left with the biggest possible 'N X T' balanced panel. Is there a stata program that automatically does that ?
>
> I am aware of stfill and xtbalance. But I don't think they do, what I want to do.
>
> regards,
>
> Vinod
> *
> * 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/
>
--
Regards
---------------------------
Muhammad Anees
Assistant Professor
COMSATS Institute of Information Technology
Attock 43600, Pakistan
www.aneconomist.com
*
* 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/