>
Is append what you are looking for?
Dev
>>> [email protected] 08/19/05 3:49 pm >>>
Dear all,
I'm wondering whether there is some way to do a many-to-many merge in
the following sense:
eg. for some id, I have 2 observations in data set a, and 3
observations in data set b; how can I merge a and b to get a new data
set with 6 observations for this id(all the possible combinations of
the observations from a and b)?
What comes to my mind is to reshape one data set to a wide one to make
the id a unique identifier for merge, and then reshape the resulting
data set back to a long one.
I'm curious about easier ways to do this. Thanks in advance for any suggestion.
Best,
Luhang
*
* 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/
This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.
*
* 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/