BookmarkSubscribeRSS Feed
xiaobing
Calcite | Level 5

Hello, guys. I'm trying to replicate a empirical paper and I stick in a data step. Basically, I have a list of ID, dates, industry and firm ratios. What I wan to do is to locate another company with different id but the same date in another larger data set, Also, this matching company should be in the same industry and have similar ratios (within the range of plus and minus 10% of the companies in the original list). I'm wondering anyone can help?

Thank you so much

XB

2 REPLIES 2
LinusH
Tourmaline | Level 20

To perform conditional matching, use SQL join.

Data never sleeps
Doc_Duke
Rhodochrosite | Level 12

This is a common problem in epidemiology.  Sufficiently so, that some macros have been developed.  Check out

http://support.sas.com/resources/papers/proceedings10/061-2010.pdf

(I just googled

matching macro site:sas.com

).

As LinusH suggests, you could do it as a one-off with SQL.  If your large data set is really big, the computer time might be huge.

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1415 views
  • 0 likes
  • 3 in conversation