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]

Re: st: AW: combining datasets


From   martine etienne <[email protected]>
To   [email protected]
Subject   Re: st: AW: combining datasets
Date   Wed, 18 Aug 2010 08:02:49 -0700 (PDT)

thanks Maarten,
firstly, person 1 in dataset A is NOT same person as person 1 in dataset B, 
measurements are also taken at different times
secondly, I would like the final dataset to look like Final 1



----- Original Message ----
From: Maarten buis <[email protected]>
To: [email protected]
Sent: Wed, August 18, 2010 10:05:41 AM
Subject: Re: st: AW: combining datasets


--- On Wed, 18/8/10, martine etienne wrote:
> ...well the unique identifiers are id
> variables, i guess i want to know which is 
> a better method, I don't want to lose the unique ids

That still really depends on what you want to do and 
what is in those datasets.

Say we have two dataset:
A:

id x
1  3
2  4

B:

id x
1  5
2  6

The first question is: is person 1 in dataset A the same person
as person 1 in dataset B, e.g. are they measurements taken
at different times. 

The second question is: what do you want your final dataset to 
look like, Final 1 or Final 2? (Final 2 is only possible if you
answered yes to question 1)

Final 1
id source x
1  A      3
2  A      4
1  B      5
2  B      6

Final 2
id xA xB
1  3  5
2  4  6

Hope this helps in pinning down your question,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------



      

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



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