SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

matching with control firms with some conditions.

Reply
Occasional Contributor
Posts: 17

matching with control firms with some conditions.

I am having a new problem. 

My imaginary data:

Sample firms:

yr       tick sic  asset

2011 AB 20 2000
2011 BC 21 3000
2011 CD 22 4000
2011 DE 23 5000
2011 EF 24 6000

 

Control firms:

yr       tick sic  asset

2011 DE 20 900
2011 XS 24 3300
2011 SA 23 2600
2011 FR 22 2000

2011 TH 22 1500

2011 YU 23 2500

 

My question:

I want to match firms on the basis of sic and asset. My condition is sample firms' asset may be 50% of control firms or vice verse. WHat should be my coding? 

 

Thank you.

Super User
Super User
Posts: 7,407

Re: matching with control firms with some conditions.

Hi,

 

You say nothing about what you want in the output dataset, what the linking variables should be, what you mean by "matching" etc.  You should be able to construct a simple SQL statement to do this, condition, you could have where (sample.asset /100)*50 <= control.asset <= (sample.asset/100)* 150.

 

Joins are (note these examples would need to be in a proc sql; quite; block):

Capture.PNG

 

 

Ask a Question
Discussion stats
  • 1 reply
  • 224 views
  • 0 likes
  • 2 in conversation