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

st: Data Merge Question

From   "Lektzian, David" <[email protected]>
To   <[email protected]>
Subject   st: Data Merge Question
Date   Thu, 31 Jan 2008 18:41:04 -0600

Dear Statalist,
I am trying to merge together two datasets that look something like

Data in memory
var1  var2  var3 [additional variables]

Using Data:
var1 var2 var3 [additional variables that I want to add to the data in

The problem I'm having is that the data in memory is not unique on these
three variables, but the using data is.  I do not mind that the data in
memory is not unique on these variables, because there is a fourth
variable in the data in memory that makes them unique.  But this
variable is not part of the using data.  I just want to merge in
additional variables from the using data so that they can be added to
the data in the memory.  I don't mind that the observations are repeated
in the data.  After the merge I just want to have the same number of
observations that I began with in the data in memory.  Here is what I
tried and the result:

.merge var1 var2 var3 using "C:\Data.dta", uniqmaster nokeep

variables var1 var2 var3 do not uniquely identify observations in the
master data

I'm sure that I am overlooking something very simple.  Any help would be


*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index