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: st: merging multiple files in stata


From   daniel klein <klein.daniel.81@googlemail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: merging multiple files in stata
Date   Thu, 22 Mar 2012 16:39:02 +0100

Steve,

note that if you assume Stata 11 syntax for -merge- you do not need
the -sort-ing part, because as of Stata 11 the datasets to be -merge-d
do no longer need to be sorted (one of my favorite enhancements in
-merge-).

Negussie,

using old -merge- syntax, as you are doing, allows multiple files to
be -merge-d. The syntax digram reads

merge [varlist] using filename [filename ...]

so after preparing all your files you could try

use temp_physn.dta
merge bene_id mnth using temp_hsps.dta temp_opmnth.dta

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