Hi, I'm trying to merge two datasets: one with M&A deals and one with returns. When merging 1:1, most of the observations are merged correctly, but some are not merged due to wrong dates given by the data provider:
These dates are often 1 or 2 days off (sometimes more). Is there a way to paste the car3 (returns) to the closest observation with the same acquirer ticker for these wrong observations (_merge == 2)?
Thanks.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str9 acquirerticker str8 targetticker float(ann_date car3) "UTX" "COL" 21066 . "UTX" "RTN" 21709 . "UTX" "" 21067 -.08387527 "UTX" "" 21710 -.0820588 end format %td ann_date
Thanks.
Comment