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: Puzzling error with merge


From   Barbara Romano <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Puzzling error with merge
Date   Mon, 13 Jan 2014 14:23:12 +0100

Hi David ,
it happened to me last week. After a while I realized that there were some “missing” in my id (key variable). I deleted all the observations with the missing id, than everything worked out.
Barbara



Il giorno 13/gen/2014, alle ore 13:42, David Hoaglin <[email protected]> ha scritto:

> Dear All,
> 
> I attempted to merge two datasets, each of which has 247 observations,
> with the following command:
> 
> merge 1:1 StudyID using Sheet2
> 
> (here "Sheet2" is the last part of the fully qualified name of the
> file, recently imported from Excel).
> 
> I received the following error message: "variable StudyID does not
> uniquely identify observations in the master data".
> 
> I then tabulated StudyID in the two files.  Each output showed no
> frequency other than 1 and a total of 247 observations.
> 
> What am I doing wrong?
> 
> I am using Stata 13.1.
> 
> Thanks for your help.
> 
> David Hoaglin
> *
> *   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