BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UcheOkoro
Lapis Lazuli | Level 10

Hello,

 

Please I need help with PSMATCH code for optimal paired matching after multiple imputation. I do not know how to make it match each imputed data. I am familar with using PSMATCh for  a single data set not multiple.

The following is my code below.

Thank you.

ods graphics on;
proc psmatch data=mi_fcs2 region=cs;
class telemed_use sex  mode_arrival pmh_copd pmh_cirrhosis pmh_transplant pmh_cancer pmh_diabetes pmh_dialysis  ;
psmodel telemed_use(Treated='1')= sex Age2 bmi2 triage_pulse2 infection_ed_source2 total_sofa1_ed2 mode_arrival pmh_copd pmh_cirrhosis pmh_transplant 
                                     pmh_cancer pmh_diabetes pmh_dialysis triage_systolic  Lactate1_cat firsted_hosp2 ;
match method=optimal(k=1)  stat=ps caliper=.;
assess ps var=( sex Age2 bmi2 triage_pulse2 triage_systolic total_sofa1_ed2 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;
1 ACCEPTED SOLUTION

Accepted Solutions
UcheOkoro
Lapis Lazuli | Level 10

proc psmatch data=mi_fcs2 region=cs;
class telemed_use sex mode_arrival pmh_copd pmh_cirrhosis pmh_transplant pmh_cancer pmh_diabetes pmh_dialysis ;
psmodel telemed_use(Treated='1')= sex Age2 bmi2 triage_pulse2 infection_ed_source2 total_sofa1_ed2 mode_arrival pmh_copd pmh_cirrhosis pmh_transplant
pmh_cancer pmh_diabetes pmh_dialysis triage_systolic Lactate1_cat firsted_hosp2 ;
by _Imputation_;
match method=optimal(k=1) stat=ps caliper=.;
assess ps var=( sex Age2 bmi2 triage_pulse2 triage_systolic total_sofa1_ed2 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;

View solution in original post

1 REPLY 1
UcheOkoro
Lapis Lazuli | Level 10

proc psmatch data=mi_fcs2 region=cs;
class telemed_use sex mode_arrival pmh_copd pmh_cirrhosis pmh_transplant pmh_cancer pmh_diabetes pmh_dialysis ;
psmodel telemed_use(Treated='1')= sex Age2 bmi2 triage_pulse2 infection_ed_source2 total_sofa1_ed2 mode_arrival pmh_copd pmh_cirrhosis pmh_transplant
pmh_cancer pmh_diabetes pmh_dialysis triage_systolic Lactate1_cat firsted_hosp2 ;
by _Imputation_;
match method=optimal(k=1) stat=ps caliper=.;
assess ps var=( sex Age2 bmi2 triage_pulse2 triage_systolic total_sofa1_ed2 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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 6350 views
  • 0 likes
  • 1 in conversation