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: merge cross sectional data with same idno for different persons


From   Theocharis Kromydas <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: merge cross sectional data with same idno for different persons
Date   Fri, 27 Dec 2013 11:56:40 +0000

Dear Statalisters

I have two data sets. One for 2004 and another for 2010. Both data sets include different persons living in different countries. The persons are all different. The variable names are not always the same. 

The id variable in both data sets has the same name (idno) but it can take the same value even within the same data set, referring to different persons from different countries. For example in 2004 data set idno can take the value 1 for a person living in Sweden and for another person living in UK. These are not the same persons but the idno can take the value 1 to both. Both datasets include the same number of countries but refer to different years. There are 19 countries to both data sets but not all of them share similar idno values. So, a person from Sweden can have the same idno with a person in Uk but it can also have the same idno with a person living in Belgium in 2010 dataset. Moreover a person living in Belgium in 2004 can have the same idno number with a different person living in Belgium in 2010.

I want to merge the two files creating a new file which will include all persons and all observations for variables who have the same name in 2004 and 2010 datasets plus all observations from variables which are unique to each.

I would appreciate any help to this

Thanks
Harry

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index