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 at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: merge creates duplicates in master data


From   Will Hauser <whauseriii@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: merge creates duplicates in master data
Date   Mon, 26 Apr 2010 09:20:59 -0400

Jose,
I appreciate your help but could you be a bit more clear about the joinby command? Joinby results in many more duplicates than I obtain with the merge command. The unmatched option must be specified as none (the default), master, using, or both. I tried 'none' and 'master', the two plausible specifications but both result in several hundred duplicates.

My primary concern with the merge command is not so much the resulting duplicates - they are few and I can identify and remove them with the 'duplicates' command. Rather, it is that I do not fully understand the command itself or there is some flawed logic in my multi-step approach. Additional documentation on the merge command or any other insights as to how I might best match these lists would be most helpful.

One tidbit I did not add in the first post is that in addition to the update option I am also using the nokeep option. The master list is the definitive list if an observation is not on that list then that observation will not be needed.

I may try to track down a copy of stata11 to try the new merge command. Thanks for that suggestion.

Will


Jose Ricardo Nogueira wrote:
Stata 11 has a new merge command that will get rid of this problem,
but in Stata 10 you can do this with joinby command and unmatched
option.

Sincerely,

Jose

Hello all,

I am experiencing unexpected behavior in Stata 10 when using the merge
command.
*
*   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/


*
*   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