Bookmark and Share

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

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

st: vexing m:m merge

From   Lloyd Dumont <>
Subject   st: vexing m:m merge
Date   Wed, 23 Feb 2011 10:25:58 -0800 (PST)

This has to be obvious...

If I am running a many to many merge keeping only observations in the master and those that match the using, then how could the merge be generating new observations in the master?

More succinctly, I am inputting...

. merge m:m X1 using "usingfile.dta", keep(master match) keepusing(X2)

Before the merge, n = 1061.  After the merge, n = 1077.

I tried to troubleshoot by generating a TAG variable and setting it to one, but after the merge, every observation--even the new ones--have TAG = 1.

Thank you for your thoughts/help.  Lloyd

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index