[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: merge
Perhaps they are not mean to be unique. You need to consider the nature of
your data to determine that.
But meanwhile, a good rule to follow is that in general, for a matched
-merge- to be meaningful, either the master or the using should be unique
in the identifier(s) -- perhaps both, but at least one of them should be
unique. In your case, the using data are not unique, but presumably, the
master data are. This may be quite okay; that depends on the nature of the
Assuming that it is meaningful to merge your datasets with these
conditions, you should specify
-uniqmaster-, rather than -unique-.
(When one dataset is unique and the other isn't, I find it conceptually
easier to comprehend if it is the master data that are unique. But it
really doesn't matter.)
On the other hand, if you truly need for both sets to be unique, then there
is something wrong with the data.
I hope this helps.
At 06:43 AM 2/20/2004 -0800, Anuja wrote:
Dear Stata users,
I am trying to merge two datasets with 5 unique
identifyers. The master dataset has 1396 obs, and the
using one has 8675.
merge prov cd cu dwg month using
1) when i use the option unique i get
variables prov cd cu dwg month do not uniquely
identify observations in the using data
I have sorted them, and cann't figure out what how to
go abt it.
Institute for Policy Studies
Johns Hopkins University
* For searches and help try:
- st: merge
- From: Anuja Saurkar <firstname.lastname@example.org>