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?
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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.