Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: [iso-8859-15] Delete data that appears "twice" in a mixture of panel[iso-8859-15] - and crosssectional data


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   "Nick Cox" <n.j.cox@durham.ac.uk>, <statalist@hsphsun2.harvard.edu>
Subject   st: RE: [iso-8859-15] Delete data that appears "twice" in a mixture of panel[iso-8859-15] - and crosssectional data
Date   Mon, 25 Feb 2008 12:35:47 -0000

replace Id = Id60 if Id60 < . 
duplicates drop Id, force  

Nick 
n.j.cox@durham.ac.uk 

Markus Köller

-> I am using a mixture of paneldata and cross-sectional data which is organized in the following form:

Id   Wave   Age    Gender ..... etc...    Id60

1     60                                                 .
2     60                                                 .
3     60                                                 .
4     65                                                 .
5     65                                                 1  
6     65                                                 .  
.
.
.
etc....

To continue my analysis, I will have to delete the households from wave "60", which also appear in the "later" wave.
In other words, I have to delete the data in a way, that the above  table looks like:

 Id   Wave   Age    Gender ..... etc...    Id60

2     60                                                 .
3     60                                                 .
4     65                                                 .
5     65                                                 1  
6     65                                                 .  
.
.
.
etc....

, because household "1" also appears in 65-wave.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index