Bookmark and Share

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: dropping panels with missing values


From   "Zied Ouelhazi" <[email protected]>
To   <[email protected]>
Subject   st: Re: dropping panels with missing values
Date   Tue, 15 Jan 2013 03:34:04 +0100

It works!!! thanks a lot

-----Message d'origine----- From: Nick Cox
Sent: Tuesday, January 15, 2013 3:12 AM
To: [email protected]
Subject: Re: st: dropping panels with missing values

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/
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index