Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: Can -merge ..., nokeep- result in more observations?


From   Jen Zhen <jenzhen99@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Can -merge ..., nokeep- result in more observations?
Date   Tue, 22 Nov 2011 20:29:25 +0100

Dear Listers,

I used the following command in Stata 11: - merge id year using
dataA.dta, nokeep - (which Stata tells me is old-fashioned these days,
but should nonetheless still work)
and I understood that -nokeep- would ensure that for those
observations contained in the master dataset it would add information
on new variables from the using dataset,
but it would not add observations from the using dataset that are not
already contained in the master dataset.

Nonetheless I just figured out that this -merge, nokeep- command has
increased the number of my observations, and I am puzzled why this is
so. Can anyone help here?

Just in case this matters: Observations are not necessarily unique in
the master dataset.

Thanks a lot,
JZ
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index