BookmarkSubscribeRSS Feed
amanjot_42
Fluorite | Level 6

Hi all,

I am trying to come up with control firms for treatment firms in the sample. It is a cross-sectional data, and I want one control firm (matched within the same industry code and closest propensity score) for each treatment firm. So, one-on-one matching for a treatment-control pair.

 

If firm B can act as a control firm for firm A (based on the criteria, i.e. same industry code and closest propensity), then it should not act as a control for any other firm. However, the next best alternative should be used as a control firm, i.e. within the same industry code, but the next best closest propensity score.

firm_id  Treatment_indicator Industry_code        Pscore

1111                   0                       11                        0.35

1112                  1                        11                        0.44  

1113                  0                        12                        0.60

1114                  0                        15                        0.80

1115                  1                        17                       0.56

 

After creating two separate files for treatment and control firms, I am using this code (I got it from previous posts):

data treatment_firms conrol_firms;
set have;
if treatment_indicator = 0 then output control_firms;
if treatment_indicator = 1 then output treatment_firms;
run;

proc sql;
create table like_each_other as
select O.*, T.firm_id as Tfirm_id, abs(O.pscore-T.pscore) as P_Diff
from control_firms as O inner join treatment_firms as T
on o.industry_code=t.industry_code
order by tfirm_id;
quit;

proc means data=like_each_other noprint;
by Tfirm_id;
output out=close_match idgroup(min(P_diff) out[1] (firm_id)=);
run;

Can you please help in coming up with the correct codes? These codes are working on 'with replacement' basis, so, one control firm is chosen as a 'control firm' for another treatment firm as well. I want one firm to act as a control for only one treatment firm. 


Regards,
Aman

1 REPLY 1
pink_poodle
Barite | Level 11
We do not want to re-invent the PSMATCH procedure here. The default for this procedure is without replacement, so it will suit just fine:
https://documentation.sas.com/?docsetId=statug&docsetVersion=14.2&docsetTarget=statug_psmatch_syntax...
Here is a nice example to work from (omit "method=replace" for without replacement):
https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_psmatch_examples05.htm%3Flocale&d...
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
  • 1 reply
  • 1232 views
  • 0 likes
  • 2 in conversation