Hi guys
I need to solve a matching problem.
I have two samples of data, and for each sample i have 5 columns of data (company name, IPO year, SIC code, Total assets and ROA)
I would like to set up a function that based on the one sample (RLBOs) matches each observation on IPO year, SIC code, Total assets and ROA respectively and returns the company name from the other sample (IPOs).
I envision a function that first matches on IPO year, then finds the closest SIC code within that subsample, then finds the closest total assets within that subsample and finally finds the closest ROA within that subsample.
So, for each firm in the RLBO sample I need to find the closest matching firm in the IPO sample on the specified variables.
I've attached both samples in case my description is unclear.
Any help is greatly appreciatied!
Bookmarks