BookmarkSubscribeRSS Feed
sandrube
Fluorite | Level 6

Hello friends,

 

I am trying to propensity score matching and when I run it, 'Standardized Mean Differences (Treated - Control)' table has some variables omitted. What could be the reason? I don't have missing data.

 

proc psmatch data=nis_1 region=treated;
class obese age race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression Abuse Psychiatric CM_LIVER CM_CHRNLUNG
HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH;
psmodel obese (Treated='1')=age race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression Abuse Psychiatric CM_LIVER CM_CHRNLUNG
HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH;
match method=greedy(k=1) distance=lps caliper=0.5;
assess ps var=(age race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression Abuse Psychiatric CM_LIVER CM_CHRNLUNG
HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH)/ weight=none;
output out(obs=match)=matched matchid=_MatchID;
run;

 

Thank you very much for your helo!

 

Rubens

 

 

4 REPLIES 4
Reeza
Super User
Please show the log.
sandrube
Fluorite | Level 6

Below is the log:

 

1 The SAS System 20:02 Thursday, August 19, 2021

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='2. PS Match.sas';
4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='E:\_Papers\NIS - Obesity and pregnancy\SAS codes\2. PS Match.sas';
9 %LET _SASPROGRAMFILEHOST='DESKTOP-6962RGI';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=SVG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 %macro HTML5AccessibleGraphSupported;
15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) >= 0 %then ACCESSIBLE_GRAPH;
16 %mend;
17 FILENAME EGHTML TEMP;
18 ODS HTML5(ID=EGHTML) FILE=EGHTML
19 OPTIONS(BITMAP_MODE='INLINE')
20 %HTML5AccessibleGraphSupported
21 ENCODING='utf-8'
22 STYLE=HTMLBlue
23 NOGTITLE
24 NOGFOOTNOTE
25 GPATH=&sasworklocation
26 ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27
28 proc psmatch data=nis region=treated;
29
30 class obese race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression Abuse Psychiatric
30 ! CM_LIVER CM_CHRNLUNG
31 HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH;
32
33 psmodel obese (Treated='1')= age race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression
33 ! Abuse Psychiatric CM_LIVER CM_CHRNLUNG
34 HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH;
35
36 match method=greedy(k=1) distance=lps caliper=0.5;
37
38 assess ps var=(age race pay1 ZIPINC_QRTL ELECTIVE MultipleBirths PreviousCS PreDM CRD PreHTN Depression Abuse Psychiatric
38 ! CM_LIVER CM_CHRNLUNG
39 HOSP_REGION HOSP_LOCATION HOSP_BEDSIZE HOSP_TEACH)/ plots=all weight=none;
40
41 output out(obs=match)=NIS_1 matchid=_MatchID;
42
43 run;

WARNING: You must enable ODS graphics before requesting plots.
WARNING: The classification variable RACE in the VAR= option in the ASSESS statement is not a binary variable. The variable is not
used in the ASSESS statement.
WARNING: The classification variable PAY1 in the VAR= option in the ASSESS statement is not a binary variable. The variable is not
used in the ASSESS statement.
WARNING: The classification variable ZIPINC_QRTL in the VAR= option in the ASSESS statement is not a binary variable. The variable
is not used in the ASSESS statement.
WARNING: The classification variable HOSP_REGION in the VAR= option in the ASSESS statement is not a binary variable. The variable
is not used in the ASSESS statement.
WARNING: The classification variable HOSP_BEDSIZE in the VAR= option in the ASSESS statement is not a binary variable. The variable
2 The SAS System 20:02 Thursday, August 19, 2021

is not used in the ASSESS statement.
NOTE: The data set WORK.NIS_1 has 128074 observations and 83 variables.
NOTE: PROCEDURE PSMATCH used (Total process time):
real time 2:26.72
cpu time 1:57.29

44
45 %LET _CLIENTTASKLABEL=;
46 %LET _CLIENTPROCESSFLOWNAME=;
47 %LET _CLIENTPROJECTPATH=;
48 %LET _CLIENTPROJECTPATHHOST=;
49 %LET _CLIENTPROJECTNAME=;
50 %LET _SASPROGRAMFILE=;
51 %LET _SASPROGRAMFILEHOST=;
52
53 ;*';*";*/;quit;run;
54 ODS _ALL_ CLOSE;
55
56
57 QUIT; RUN;
58

Reeza
Super User
Notice the massive set of warnings. Do the variables you don't get results for align with the variables that SAS is saying are not specified correct?

MichaelL_SAS
SAS Employee

As noted in the PROC PSMATCH documentation for the ASSESS statement, the variables listed in the VAR= option must be either continuous or binary. The SAS log you provided includes a number of WARNING messages indicating that some non-binary categorical variables listed in the ASSESS statement and are not used, i.e. 

 

WARNING: The classification variable RACE in the VAR= option in the ASSESS statement is not a binary variable. The variable is not used in the ASSESS statement.

 

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 and variance 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 do use the GLM 0/1 coding and look at comparisons of level proportions 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 use 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 Forum Paper (in particular PROC FREQ is used around the end of page 14).

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 1924 views
  • 1 like
  • 3 in conversation