- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 01-18-2022 12:08 PM
(1015 views)
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
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