Hello SAS Community,
I am trying to conduct a matched case-control study (based on propensity scores AND also using the exact approach). I tried using the PSMATCH procedure but I am getting these warnings:
WARNING: An effect for the logistic regression model is a linear combination of other effects. The
coefficient of the effect is 0.
WARNING: Some treated units have less than the specified K=3 matched controls because there are not
enough available controls for these treated units.
I have SAS Base 9.4_M4 and SAS/STAT 14.2. Is this the reason for the warnings? I appreciate any suggestions.
Note: "psmodel", "match" and "assess" all appear in red fonts in SAS.
Below is my code:
proc psmatch data = cohorts region = allobs;
class Cohort Year Sex Race;
psmodel Cohort(Treated='Diseased') = Year Sex Race Age_at_Surgery;
match method = greedy(k=3) exact = Sex Race stat = ps caliper = 0.05;
assess ps var = (Sex Race) / plots = all weight = none;
output out(obs=match)=matcheddsn matchid = match_id;
run;
The first warning indicates that some variable in the propensity score model can be written as a linear combination of the other variables in the model. This type of check is standard in the modeling procedures. Most modeling procedures would reflect this in a Parameter Estimates table but because PROC PSMATCH does not report a parameter estimates table it issues this type of message.
The second message indicates that during the greedy matching process there were some treated units that did not have at least three control units that satisfied all the conditions imposed on the matching. For the code you provided those conditions are that the matching be exact on the variables listed in the EXACT= option, that the matched units be within the caliper value, and the greedy matching is also done without replacement.
Looking at the code you provided I’ll make two quick comments about the conditions being imposed using the EXACT= and CALIPER= options. If you list multiple variables in the EXACT= option they should be included in parentheses, for example EXACT=(SEX RACE). If you omitted the parentheses the procedure would likely report a syntax error in the log about an unrecognized option or parameter.
For the CALIPER= option, note that as described in the PROC PSMATCH documentation here, by default the value you specify is multiplied by an estimate for the standard deviation of the propensity scores (or logits of the propensity scores), and that is what’s used as the caliper value. The caliper value that's used is displayed in the “Matching Information” table. In your example code the CALIPER=0.05 specification might be resulting in a very conservative caliper value which could be related to the second warning you see. If you wanted to specify 0.05 as the caliper value, you can use the syntax CALIPER(MULT=ONE)=0.05.
The statements you observed in red are not related to any error. The editor was just behind in being updated to recognize the new statements.
The first warning indicates that some variable in the propensity score model can be written as a linear combination of the other variables in the model. This type of check is standard in the modeling procedures. Most modeling procedures would reflect this in a Parameter Estimates table but because PROC PSMATCH does not report a parameter estimates table it issues this type of message.
The second message indicates that during the greedy matching process there were some treated units that did not have at least three control units that satisfied all the conditions imposed on the matching. For the code you provided those conditions are that the matching be exact on the variables listed in the EXACT= option, that the matched units be within the caliper value, and the greedy matching is also done without replacement.
Looking at the code you provided I’ll make two quick comments about the conditions being imposed using the EXACT= and CALIPER= options. If you list multiple variables in the EXACT= option they should be included in parentheses, for example EXACT=(SEX RACE). If you omitted the parentheses the procedure would likely report a syntax error in the log about an unrecognized option or parameter.
For the CALIPER= option, note that as described in the PROC PSMATCH documentation here, by default the value you specify is multiplied by an estimate for the standard deviation of the propensity scores (or logits of the propensity scores), and that is what’s used as the caliper value. The caliper value that's used is displayed in the “Matching Information” table. In your example code the CALIPER=0.05 specification might be resulting in a very conservative caliper value which could be related to the second warning you see. If you wanted to specify 0.05 as the caliper value, you can use the syntax CALIPER(MULT=ONE)=0.05.
The statements you observed in red are not related to any error. The editor was just behind in being updated to recognize the new statements.
Thank you so much. This is helpful.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.