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: Matching new and old id's in multiple years to create a panel


From   Kirk Geale <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index