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: merging datasets


From   "Achilleas Vassilopoulos" <[email protected]>
To   <[email protected]>
Subject   st: RE: merging datasets
Date   Tue, 20 Nov 2012 10:17:54 +0200

Hi Nick,

Not sure I get your point. My guess is that there are variables(columns) in
B that are not present in A. Is that right?
If this is the case, you need:

merge 1:1 id using "B", keepusing (the list of variables that are present in
B but not in A)

Hope this helps,
Achilleas

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Nikolaos Pandis
Sent: Tuesday, November 20, 2012 9:43 AM
To: [email protected]
Subject: st: merging datasets

Dear all,

I would appreciate any help on the following:

I have 2 datasets A (~150 observations) and B (~45 observations)
B is included in A and share some common fields including observation id
(num)
It should have been one dataset but unfortunately it is not and I would like
to merge them.
Dataset B has all the fields of A but some extra ones.
Q: is there a way to append the extra fields (for the eligible
observations) from dataset B to dataset A using observation id as the link?

many thanks  

Nick

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


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