Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: st: combining datasets


From   "E.J. van Ingen" <E.J.vanIngen@uvt.nl>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: Re: st: combining datasets
Date   Fri, 17 Aug 2012 12:13:38 +0000

Dear Kenisha, 
It would be easier to give you advice if you posted the syntax you used and error messages you got. Without those it is a guess what went wrong. 
- Do the identification variables all have the same name across the datasets? 
- Do the identification variables uniquely identify the cases?

Assuming the identification variables are ID - year - month and the answer to the second question is yes, the syntax could look somewhat like this:
use "name of the first file"  
merge 1:1 ID year month using "name of the second file"
drop _merge
merge 1:1 ID year month using "name of the third file"
etc.

Best,
Erik




-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Kenisha Russell
Sent: vrijdag 17 augustus 2012 13:32
To: statalist@hsphsun2.harvard.edu
Subject: Re: Re: st: combining datasets

Hi Nick, 

I feel that your answer to my post was quite hard, as I thought that one of the goals of the list was to help less experienced people. 
So based on this premise, I submitted my question. 

I have read the -help merge- , and tried different syntaxes but was unable to get my data in the format I wanted.  
I do apologise, if you think that my lack of knowledge or requesting help was offensive to those who had more important issues to resolve. 

Kenisha




*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index