Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

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


From   Jen Zhen <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index