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: dropping panels with missing values
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: dropping panels with missing values
Date
Tue, 15 Jan 2013 02:12:43 +0000
One way
. help egen
Use -rownonmiss()- across variables; then -total()- by panels.
egen mpresent = rownonmiss(y x1 x2 x3 x4)
egen npresent = total(mpresent == 5), by(panelid)
keep if npresent == 24
Nick
On Tue, Jan 15, 2013 at 1:55 AM, Zied Ouelhazi <[email protected]> wrote:
> I am working on panel data (N=204, Ti = 1985...2008)
> I would like to identify and keep panels which have the same time spell (on
> a set of dependent variables and key covariates).
> How could I proceed on Stata 12
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/