Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: combining data sets with different dimensions


From   "Marino, Jennifer" <jmarino@fhcrc.org>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: combining data sets with different dimensions
Date   Fri, 14 Apr 2006 16:15:53 -0700

Kremena -
The merge should still have happened (-tab _merge- to see, or look at
the data using the data editor, which is my favorite way to reassure
myself or spot problems), but Stata informs you that you have performed
a merge where your match variables weren't unique - and so you've
"spread" the shorter dataset's information across multiple observations
per match variable in your using set. That is, you have multiple
instances of USA,2003 in your master dataset, and you wanted to stick
the relevant GDP onto each one, not just the first. You did it on
purpose, and there's nothing the matter with that, but Stata likes to
make sure you know, just in case you thought you were using unique
values. Merging incorrectly can make complete hash of datasets, so Stata
tries its best to protect you before you save over your old set or
otherwise foul up your life. 
Good luck. (If you're trying to run the code Maarten supplied as a
do-file and Stata is sticking at that point, you could run it with the
nostop option, but it's quite a bit safer to run it interactively and
make sure you're where you want to be at each step.)
Jen Marino

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Kremena
Platikanova
Sent: Friday, April 14, 2006 3:09 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: combining data sets with different dimensions


When I try that, at the step:
merge importer year using dataset2.dta

I receive the message: variables importer year do not uniquely identify
observations in the master data

What do I need to do differently?

Kremena


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