I am doing reference cell coding with a binary categorical predictor.
According to max likelihood table,
Intercept = 0.2335, and that is the predicted logit probability of the reference level.
However, the effect plot shows a dot at >0.50 for the predicted probability of that level.
Why is that? Please let me know possible explanations.
proc logistic data=have plots(only)=(effect oddsratio);
class x(ref='<=60 min')/ param=ref;
model y(event='1')= x / clodds=pl;
run;
You can get the exact predicted values by using
ods output effectplot=EFPLOT;
proc logistic....
run;
proc print data=EFPLOT; run;
The estimate for the Intercept (reference level) is 0.2335.
Then the predicted value for the reference category is
p = logistic( 0.2335 );
which is 0.5581. This looks like the height of the dot for the reference category, so it looks like all is well. If the height is different from 0.5581, let me know.
Can you upload the image so we can see it?
maximum likelihood table
effect plot
You can get the exact predicted values by using
ods output effectplot=EFPLOT;
proc logistic....
run;
proc print data=EFPLOT; run;
The estimate for the Intercept (reference level) is 0.2335.
Then the predicted value for the reference category is
p = logistic( 0.2335 );
which is 0.5581. This looks like the height of the dot for the reference category, so it looks like all is well. If the height is different from 0.5581, let me know.
The ods output value is 0.558105622519328. Thank you!
Double-checked the logistic function:
logit(p) = ln(odds)
let logit(p) = a
odds = p / ( 1 - p )
p / (1 - p) = e^a
p = e^a - p*e^a
p*(1 + e^a) = e^a
p = e^a / (1 + e^a) = logistic(a)
Yes. Equivalently, p = 1 / (1 + exp(-a)), which is shorter to write.
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.
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.