Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Requirement(s) for a match merge


From   David Kantor <[email protected]>
To   [email protected]
Subject   RE: st: RE: Requirement(s) for a match merge
Date   Wed, 30 Mar 2005 12:48:38 -0500

At 05:34 PM 3/30/2005 +0000, Louis wrote:
Perhaps an example will clarify my concern. Suppose we have the following datasets, where -id- (the identifier) represents family code:
Dataset1
id father
1. 1 John
2. 2 Peter
3. 3 Sam

Dataset2
id child
1. 1 Bill
2. 2 Joe
3. 2 Mary
4. 3 Phil
5. 3 Sue
6. 3 Pat

I was thinking that even though -id- does not uniquely identify each observation in dataset 2, the datasets can still be merged using -id- as the match variable to obtain a result like the following:

id father child
1. 1 John Bill
2. 2 Peter Joe
3. 2 Peter Mary
4. 3 Sam Phil
5. 3 Sam Sue
6. 3 Sam Pat

Or is it that this kind of merge is not called match merge? Thanks.

Louis
[...]
That's exactly what I meant in my last message -- that the identifier uniquely identifies observations in one file but not the other. I do call this a match merge, and I believe that StataCorp does as well.
--David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index