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: Create common ID # from several changing ID #s


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   st: RE: Create common ID # from several changing ID #s
Date   Fri, 3 Dec 2010 18:30:52 +0000

On this information I can't see a method other than something of the form 

gen newid = # if inlist(current_id, <list>) | inlist(other_id1, <list>) | inlist(other_id2, <list>) 

Nick 
[email protected] 

Andrea Drechsler

I have a dataset of medical providers at the provider-year level.
Each provider has an ID #.  If the provider moves to a new location,
they are assigned a new ID #.  I have two other variables that
sometimes contain providers' previous or future ID #s.  I'm trying to
create a common ID # for each provider so I can track them over time.

For example, I'd like to assign all of the following observations a common ID #:

current_id		other_id1		other_id2
406434166		406434127
406434127		406434166		406414087
406414087		406384157
406384157


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