Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Merging using the best match from a set of variables


From   "MA V" <ma_v@hotmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Merging using the best match from a set of variables
Date   Thu, 27 Apr 2006 19:59:49 +0000

Dear statalist users,
I have a couple of datasets that I am trying to merge. The problem is that there is no unique identifier that can easily help me merge the observations from the two datasets. Is there a way of merging the datasets such that if two observations match in "most" of the variables then it's a match?
For example, if observation3 (dataset1) matches with observation2 (dataset2) in var1, var2 and var3 but not var 4 nor var5, and if observation1 (dataset1) matches with obs2 only in var3 and var5 then, obs3 (from dataset1) - and not observation1- should be merged with obs2(from dataset2).
I hope my explanation is not very confusing...
Thanks for your help!

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index