Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: merge question

From   "Daniel R Sabath" <>
To   <>
Subject   st: RE: merge question
Date   Mon, 1 Dec 2003 11:09:28 -0800

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 

-----Original Message-----
[] On Behalf Of Federico Castillo
Sent: Sunday, November 30, 2003 10:21 PM
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 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 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 Castillo, PhD
University of California
Department of Environmental Science, Policy and Management
135 Giannini Hall
Berkeley, CA 94720
Phone: 510-6430319
FAX: 510-643-2504

*   For searches and help try:

*   For searches and help try:

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