BookmarkSubscribeRSS Feed
GokulK
Calcite | Level 5

I need your help with a code. I have three samples (Sample A, B, and C). All three samples have information on SIZE, CAPEX, LEVERAGE, INDUSTRY, and YEAR. I want to create two new samples D and E.  

 

In sample D, I want to match sample A with sample C based on INDUSTRY, YEAR, SIZE, and LEVERAGE. That is, the matched firm from sample C should belong to the same industry and year as the firm in sample A. Also, the difference in SIZE + difference in LEVERAGE in the matched firms should be minimum.

 

In sample E, I want to match sample B with sample C based on INDUSTRY, YEAR, CAPEX, and LEVERAGE. That is, the matched firm from sample C should belong to the same industry and year as the firm in sample B. Also, the difference in CAPEX + difference in LEVERAGE between the firm in samples B and C should be minimum.

 

Another condition is that the firms from sample C that are matched with sample A should not be used in the matching procedure of sample B.

 

In the attached file I have used an example to show the sample that I have and the sample that I want.

 

I would greatly appreciate it if someone provided me with the code so that I could get the desired output.

 

Best regards,

Gokul

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 0 replies
  • 399 views
  • 0 likes
  • 1 in conversation