Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Matching new and old id's in multiple years to create a panel


From   Kirk Geale <kirkgeale@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Matching new and old id's in multiple years to create a panel
Date   Sat, 11 Aug 2012 23:57:03 -0400

Hello,

I have separate files containing a year of data where each respondent
has a unique id.  In subsequent years, the id number for the same
person is different.  However, in a given year there is an id variable
that matches the previous year's id, called id2.  As an example, the
same respondent could have an id code 14503 in the year 2000, but
94837 in the year 2001.  In 2001, there is a second variable id2 that
records 14503, which is the respondent's id in 2000.  If the
respondent was not surveyed in the previous year, id2 is coded as 0.
This occurs in all years.  I want to match these individuals from year
to year by generating a new variable that identifies them as the same
person (where appropriate), for the end goal of survival analysis.  I
initially thought this would be very easy to do, but I can't seem to
get it.  Thanks for any ideas!

Kirk Geale
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index