This may help. Try the SSC command mmerge, which allows you to specify (1:1)
or (1:n) merges as well as having other handy extensions to the standard
merge command. Be sure to specify which variable contains the unique ID.
-----
ssc install mmerge
-----
-dan
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Federico Castillo
Sent: Sunday, November 30, 2003 10:21 PM
To: [email protected]
Subject: st: merge question
Hello everyone:
i am using stata version 8 and attempting to combine three data sets. I am
using merge because i am adding variables but (twist here) the data sets do
not contain the same observations, each year (one for each data set) has
about four or five extra observations. In any case, when i attempt to use
the merge command two things happen:
1- Some observations are copied to the master data set twice...it seems
that stata is reading the observation from the master and the "using" data
set as two different observations....
2- Stata places values where there should be no values....if a value is
missing in the using data set....in the resulting data set and after the
merge command is executed the observation is assigned a value, this is
definetelly not good.
so, my question: what is going on here? I did try to look into the
archives but could not find a related problem and its solution, i will
appreciate any help you can provide.
thanks in advance!
Federico
****************************************************************************
*****************************
Federico Castillo, PhD
University of California
Department of Environmental Science, Policy and Management
135 Giannini Hall
Berkeley, CA 94720
e-mail: [email protected]
Phone: 510-6430319
FAX: 510-643-2504
****************************************************************************
*****************************
*
* 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/
*
* 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/