BookmarkSubscribeRSS Feed
vivianwang
Calcite | Level 5

Hello SAS Community,

I'm doing 1:1 propensity score matching procedure

The data set contains 47366 samples (treatment=30694/ control=16672)

After PROC PSMATCH procedure, I got a table as belowpic.png

The number of All Obs (Treatment) and All Obs (Control) is different from the original data set, 70 of the total sample were lost. 

And I also got a warning: Some treated units do not have matched controls because there are not enough available controls for these treated units.

Is this problem related to the warning? How do I solve it?

proc psmatch data=B.HLP_ID_COMED  region=treated; 
class SEX statin c_htn c_dm c_os c_mg c_go c_as c_sch c_emd c_nd c_dp c_thy c_gl m_antihi m_bb m_diur m_ssri m_anticho  m_ppi m_glau ;
Psmodel statin (Treated='1')= AGE SEX c_htn c_dm c_os c_mg c_go c_as c_sch c_emd c_nd c_dp c_thy c_gl m_antihi m_bb m_diur m_ssri m_anticho  m_ppi m_glau; 
match method=greedy( k=1) exact=(SEX)  caliper=0.2 ; 
assess lps var=(AGE SEX c_htn c_dm c_os c_mg c_go c_as c_sch c_emd c_nd c_dp c_thy c_gl m_antihi m_bb m_diur m_ssri m_anticho  m_ppi m_glau)/plots=ALL  weight=none; 
output out(obs=match)=OUT_PSM matchid=_MatchID; run;
2 REPLIES 2
Oligolas
Barite | Level 11

Hi,

did you check if you have missings in your treatment variable?

________________________

- Cheers -

vivianwang
Calcite | Level 5

Thank you for your reply 

I’ve checked the sample and  there is no missing data.

Is there other explanations for the 70 lost from the sample?

Thank you!

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
  • 2 replies
  • 1004 views
  • 2 likes
  • 2 in conversation