Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: how add (merge!?) variables to master data set - CORRECTED INQUIRY


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: how add (merge!?) variables to master data set - CORRECTED INQUIRY
Date   Fri, 22 Apr 2005 15:25:04 +0100

Globals can interact with backslashes in 
ways that surprise you. On the other 
hand, if Stata wasn't seeing the file, 
the message might well differ. 

Nick 
n.j.cox@durham.ac.uk 

"Dietrich Drüner" 
 
> I have a actually quite simple problem, but my STATA (version 
> 7) does not understand me:
> 
> I want to add 3 variables from a different (using) data set, 
> which has only 1 observation, to my master data set in memory 
> with 28 observations.
> 
> I tried:
> merge var1 var2 var3 using "$otherdirectory\differentdataset.dta"
> 
> but I get the error message "variable var1 not found" or 
> "var1 ambiguous abbreviation" (which is definitely not true). 
> But it seems to me that "joinby" or "append" are even less 
> appropriate commands.
> It would be much more efficient if it worked somEhow this 
> way, because I must make a similar operation with 9 data sets.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index