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?
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):
Special offer for SAS Communities members
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.