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   Marcos Almeida <[email protected]>
To   statalist <[email protected]>
Subject   re: st: Puzzling error with merge
Date   Tue, 14 Jan 2014 16:28:44 -0200

Hi , David,

I guess the solution for your problem could be:

1. First, still working in Excel, be sure all the variables are
written the same way and format, as well as in the same sequence in
both spreadsheets.

2. Then, drop the first line (the one with the names of the variables)
of the second spreadsheet.

3. Finally, proceed with the merging, be it on Excel or Stata.

Once I had a similar problem, and that was the way I did to fix it.

I hope that helps!

Best,

Marcos Almeida


From: [email protected][[email protected]]
on behalf of David Hoaglin [[email protected]]
Sent: Monday, January 13, 2014 7:42 AM
To: [email protected]
Subject: st: Puzzling error with merge

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index