Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

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
  • 1016 views
  • 0 likes
  • 2 in conversation