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   "louis boakye-yiadom" <[email protected]>
To   [email protected]
Subject   RE: st: RE: Requirement(s) for a match merge
Date   Wed, 30 Mar 2005 17:34:38 +0000

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



From: "Nick Cox" <[email protected]>

Let's turn this round. If this is not true,
how do you expect match merge to work?

Nick
[email protected]

louis boakye-yiadom

> Is it true that "for a match merge to work, the identifier or
> identifiers
> must uniquely identify each observation"? I found this
> statement in sample
> lecture NC 101 (one of StataCorp's NetCourses), but I thought
> that this
> requirement (of the id uniquely identifying each observation)
> is often
> desirable, but not necessary in all cases. Any insights will
> be appreciated.

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