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: How to remove cross-sections with high number of missing values in panel data analysis


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: How to remove cross-sections with high number of missing values in panel data analysis
Date   Sat, 20 Feb 2010 10:14:56 +0100

<>

Your intent is not really clear: Do you want to discard on account of
missingness or low number of observations for a panel unit? If the latter,
simply condition on "_N" while using -bysort- for your analyses. See NJC`s
http://www.stata-journal.com/sjpdf.html?articlenum=pr0004



*******
clear*

set obs 20
gen int y=int(runiform()*1000)
gen byte id=1

/*
3 observations of y for ID=25
2 observations of y for ID=58
*/ 

input 
231 25
213 25
986 25
325 58
231 58
end

bysort id: list if _N>4, noo
*******


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Prabhat
Sent: Samstag, 20. Februar 2010 06:47
To: [email protected]
Subject: st: How to remove cross-sections with high number of missing values
in panel data analysis

Dear members,

I am new to STATA.

While analyzing a panel with 23 crosssections and 30 years, I am
getting abnormal results in some cases thanks to very few number of
observations (less than 5)  in each cross sections.

Is there any quick way to convert the value of variable in
consideration to missing in all those cross-sections with insufficient
data.

In summary,

I have
3 observations of y for ID=25
2 observations of y for ID=58

and so on

where y can have up to 30 observations for each cross-section i.e. each ID.

I need to set up some rule, which automatically discards one
cross-section if number of missing values is very high.

Any comment will be appreciated.

Thank you.

Regrads,
Prabhat
International University of Japan
*
*   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/

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


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