Date: Fri, 11 Sep 1998 17:03:35 GMT
Reply-To: Stuart Luppescu <abasl70@PRAXIS.SPC.UCHICAGO.EDU.SPC.UCHICAGO.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Stuart Luppescu <abasl70@PRAXIS.SPC.UCHICAGO.EDU.SPC.UCHICAGO.EDU>
Organization: Social Sciences and Public Policy Computing
Subject: How to do a ``closest match'' merge?
I would like to merge two data sets matching on a continuous numeric
variable. It is very unlikely that there are any exact matches, so I
want to merge cases by ``closest match.'' I thought of rounding the
matching variables, merging on the rounded variables, then selecting
the case within each rounded value with the smallest difference in
unrounded variables, but this is extremely messy. Does anyone know of
a more elegant solution? Thanks.
--
Stuart Luppescu | ** Oxymoron of the Month **
University of Chicago |``[Northern Minnesota is] God's country,
s-luppescu@uchicago.edu | in the secular sense of the term.''
:MJ8$HCRF`H~$NIc | -- Bruce Weber, NYT 8/16/93
|