proc logistic data = test;
class predictor (ref = "1");
model outcome (event = "1") = predictor;
run;
RESULTS:
Question 1: Why are my odds ratios different from exp(estimate)? For example, when predictor = "0", coefficient = 0.5660, and using OR = exp(estimate), exp(0.5660) = 1.76 but the calculated odds ratio estimate is 2.226.
Question 2: The coefficient for predictor = "2" is significant, but a value of OR = 1 spans the 95% Wald confidence interval. If this coefficient is significant, shouldn't 1 not be in the CI?
Take a look at this usage note.
23087 - Odds ratio estimate is not equal to the exponentiated parameter estimate - exp(Beta)
Essentially, the default parameterization for the CLASS variables involves effects coding and thus the odds ratios are no longer merely exp(beta) and interpretation of the parameter estimates is no longer simply the log odds comparing the level vs the reference.
If you add the option / param=ref to the end of your CLASS statement, you will find that the odds ratios equal exp(estimate), i.e.,
class predictor (ref='1') / param=ref;
There's a good explanation of what's going on here:
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.