Hello,
Please, I need some help with PS match. I tried matching a dataset using psmatch but got no matches. However, I used R and got matches.The variables are the same and size of caliper.
I sincerely cannot tell why it is so.
The following are my SAS codes.
ods graphics on;
proc psmatch data=Data10f region=cs;
class telemed_use sex Age2 bmi2 triage_pulse2 total_sofa1_ed mode_arrival pmh_copd pmh_cirrhosis pmh_transplant
pmh_cancer pmh_diabetes pmh_dialysis infection_ed_source2 Lactate1_cat firsted_hosp2;
psmodel telemed_use(Treated='1')= sex Age2 bmi2 triage_pulse2 triage_systolic total_sofa1_ed mode_arrival pmh_copd pmh_cirrhosis pmh_transplant
pmh_cancer pmh_diabetes pmh_dialysis infection_ed_source2 Lactate1_cat firsted_hosp2;
match method=optimal(k=1) exact=sex stat=ps caliper=0.25;
assess ps var=( sex Age2 bmi2 triage_pulse2 triage_systolic total_sofa1_ed mode_arrival pmh_copd pmh_cirrhosis pmh_transplant
pmh_cancer pmh_diabetes pmh_dialysis infection_ed_source2 Lactate1_cat firsted_hosp2) / weight=none plots=(boxplot barchart);
output out(obs=match)=Outgs ps=_ps matchid=_MatchID;
run;
proc sort data=outgs out=Avera_matched_data;by _ps;run;
The following is the log output I got.
Thank you
The warning is saying that the variables in the class statement are not binary. I do not want to make them binary variables. I took the variables out of the class statement , then I got no more warnings but still got no matches.
Does this imply that if the categorical variables are not binary, there won't be matches?
Thank you so much for taking time to respond to my question.
I took out the non binary categorical variables and still got no matches. I started by adding variables one by one and running PS match. Taking out those that produced on matches. I noticed that even with some binary variables there were no matches which is strange.
What happens if you increase the value for 'caliper' in the MATCH statement? It may be that the criterion is too stringent with this many variables (16, I think) to match on. I guess the most surprising thing to me is that the R package did give results with this caliper value. Check the R documentation for the definition of caliper in that package to be sure that the same definition is being applied as in PSMATCH.
SteveDenham
Increasing the caliper in the match statement in SAS makes no difference. I still do not have matches. I also noticed that optimal matching in R ignores the caliper statement.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.