Statalist The Stata Listserver


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

st: Re: How to find out if there are different variables in different waves of survey data


From   "Jens Lauritsen" <[email protected]>
To   <[email protected]>
Subject   st: Re: How to find out if there are different variables in different waves of survey data
Date   Wed, 23 Aug 2006 10:40:44 +0200 (CEST)

> Sam Rawlings, Social Sciences and Law 03 wrote::
......
>> for these  two waves and I have a dummy variable for each survey
>> (named NFHS92 and  NFHS98)


If you just need a quick answer I would do this:


* read the first file:
use nfhs92
*create a dummy indicator variable:
gen x = 1
* add the data from second round:
append using nfhs98

* show list of variables:
describe

All variables comming after x were only in the second round in the list.
To see variables only in the first round just reverse :

* read the first file:
use nfhs98
*create a dummy indicator variable:
gen x = 1
* add the data from second round:
append using nfhs92

* show list of variables:
d


Regards
Jens M. Lauritsen
Associate professor,
Southern Denmark University
Odense Denmark


*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index