BookmarkSubscribeRSS Feed
sandrube
Fluorite | Level 6

Hello friends,

 

I am trying to do PSM with the following code:

 

proc psmatch data=Data_1 region=treated;
class frail age_cat sex race insurance diabetes hypertension;
psmodel frail (Treated='1')=age_cat sex race insurance diabetes hypertension;
match method=greedy(k=1) distance=lps caliper=0.25;
assess ps var=(age_cat sex race insurance diabetes hypertension)/ plots=all weight=none;
output out(obs=match)=matched matchid=_MatchID;
run;

 

However, in the matching, race and insurance were automatically excluded. Race and insurance has more than two categories. So, in PS MATCH, I can only add dichotomous variables?

 

Thank you all!

Rube

 

1 REPLY 1
MichaelL_SAS
SAS Employee
Note that the variables RACE and INSURANCE are only excluded from balance diagnostics requested in the ASSESS statement, they are still used in the propensity score model.

My understanding of why categorical variables are not allowed in the ASSESS statement is that some of the diagnostics may not be well defined. For example in any assessment that compares the mean of a variable between the treatment conditions, i.e. the standardized mean difference plot and table, how to handle a categorical variable that takes levels say, “Very Poor”, “Poor”, “Neutral”, “Good”, “Very Good” is not straight forward.

One option would be to use the GLM 0/1 coding and look at comparisons of those variables between the treatment condition. These comparison though only tells you about balance in each level of the variable separately, not a the overall balance in the distribution of that variable. Another option would be to PROC FREQ to compare the distribution of categorical variables between treatment conditions. An example of this approach is illustrated in Example 1 of this recent SAS Global Form Paper (in particular PROC FREQ is used around the end of page 14).

https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3056-2019.pdf

SAS Innovate 2025: Call for Content

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!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 1 reply
  • 694 views
  • 0 likes
  • 2 in conversation