<>
Hi Dale:
I still don't think we have enough info here. Also, you haven't answered Martin's question about the _merge variable.
I couldn't reproduce an example of a merge 1:m on a single matched variable (id) where Stata would drop only some of the observations in only one of the using variables (your initial post indicated that the using variable (comorbid) was dropping out of the merge entirely, which is different from how you describe it in your latest email); that is, it is quite possible for there to be unmatched cases across all the using variables, but I'm not sure how it happened for only SOME of the cases of only ONE of the using variables.
Could you include an example of the master and using data showing some observations that merged properly and some that didn't (including the _merge variable)? Also, give us the exact command you used to merge (I assume you didn't merge it to the entire /data folder...were there some other options in the -merge- command that got truncated?).
Finally, you might try switching the master and using data and using -merge 1:m- or even -joinby- to see if you could get those 41k dropped observations to merge in another scenario (even if that's not the result you want, you can do this just to see if it works or produces some kind of useful error message).
~ Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]
Office: +979.845.6754
Fax: +979.845.0249
http://ppri.tamu.edu
Finally, have you tried
On Jan 21, 2010, at 1:54 PM, Hardy, Dale S wrote:
> The syntax is -merge 1:m ID using "C:DATA"-
>
> The using dataset has over 52,000 observations. All variables in the using dataset (including comorbid) have the same number of observations.
>
> However, in the merged dataset, not all of comorbid observations are merged. Only about 11,000 comorbid observations out of the 52,000 observations are merged.
>
> All of the other variables observations are merged from the using dataset.
>
>
> Can you give me some advice on how to get all of the comorbid observations to merge?
>
> Thanks.
>
> Dale
>
> ________________________________________
> From: [email protected] [[email protected]] On Behalf Of Martin Weiss [[email protected]]
> Sent: Thursday, January 21, 2010 12:47 PM
> To: [email protected]
> Subject: st: AW: merge
>
> <>
>
>
> Your request is too terse. Which _merge value is assigned to the ID in
> question? Anything else the list should know about?
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Hardy, Dale S
> Gesendet: Donnerstag, 21. Januar 2010 18:58
> An: [email protected]
> Betreff: st: merge
>
> Can you advise me on what will cause a variable not to merge with a master
> dataset, eventhough it has unique identification (ID) with the master
> dataset. Other variables in the using dataset with the same unique ID are
> merged.
>
> Thanks in advance.
>
>
> Dale
>
>
>
> *
> * 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/
>
> *
> * 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/