Possibly Michael Blasnik's -nearmrg- can be used or adapted to your needs.
-findit nearmrg- to locate and download.
Scott
> -----Original Message-----
> From: Beaulieu, Emily A [mailto:[email protected]]
> Sent: Friday, September 15, 2006 12:30 PM
> To: [email protected]
> Subject: st: in search of merge modification
>
> I am hoping to be able to perform a match-merge of 2 data sets where both
> s=
> ets have unique (country, date) observations [where the date variable is a
> =
> STATA numeric date], but the dates in the 2 data sets, are not a direct
> mat=
> ch.=A0 The countries will match, and what I would like STATA to do is
> match=
> the dates in memory to the closest preceding dates in the "using" data
> set=
> , for any given country.=A0 I would also like to perform a separate merge,
> =
> having STATA choose the closest following date in the data set.=A0
*
* 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/