Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: merging - unique observations

From   Joe Canner <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: merging - unique observations
Date   Sun, 6 Apr 2014 00:35:33 +0000


It is difficult to say for sure what the problem is without more details about your data, what command(s) you ran, and the exact error message you received.

However, it appears that at least one of the problems is that your first data set has multiple observations per country-pair (one for each year) while the second data set has only one observation per country-pair.  If this is the case, try a many-to-one merge:
. merge m:1 countrypair using distancedata
I can also imagine other problems that might arise from the use of country-pairs as the merging key, but we would have to know more about your data in order to diagnose them.

Joe Canner
Johns Hopkins University School of Medicine

From: [email protected] [[email protected]] on behalf of Andreas Dimopoulos [[email protected]]
Sent: Saturday, April 05, 2014 5:47 PM
To: [email protected]
Subject: st: merging - unique observations

Good evening,

I have two datasets where the first one contains pairs of countries and
their in between trade for different years and another dataset which has
the pair of countries and their in between distance etc (which don't change
over time). I tried to merge those two datasets based on the things I have
read but stata tells me that the observations cannot be uniquely

Any piece of advise?

*   For searches and help try:

*   For searches and help try:

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