0
$\begingroup$

I have an ordinal logistic regression model fitted with lrm from the rms library in R, and am presenting results as prob y = j|X using predict(fit, 'fitted.ind').

library(rms)
library(foreign)
df <- read.dta("https://stats.idre.ucla.edu/stat/data/ologit.dta")
dd <- datadist(df)
options(datadist = "dd")
fit = lrm(apply ~ gpa, data = df, x = T, y = T) 
pred.fitted = round(predict(fit, type = "fitted"), 2)
head(pred.fitted, 1) # predictions for the first subject 
# y >= somewhat likely 0.5; y >= very likely 0.12
pred.ind = round(predict(fit, type = "fitted.ind"), 2)
head(pred.ind, 1) # predictions for the first subject 
# y = unlikely 0.5; y = somewhat likely 0.38; y = very likely 0.12
latex(fit, file = "") # see equation below

The equation for the example model is below. I understand how to calculate the 'fitted' values (predict(fit, 'fitted'): e.g., to calculate y >= somewhat likely (0.5, see above) for the first subject in the dataset (gpa = 3.26) I calculate:

1/1 + exp(2.374854 - 0.724819 * 3.26) = 0.5,

However, I don't know how to calculate the 'fitted.ind' probabilities. How do I calculate the probability y = j|X?

In the predictions for the subject above y = unlikely is the same as y >= somewhat likely, and y = somewhat likely is y >= somewhat likely - very likely, but I don't understand why. Equation

$\endgroup$
1
$\begingroup$

P(y>=very likely) is

$1 / (1 + exp(-(-4.3999 + .7249 * 3.26))) = 0.12$

Because there is no higher category, the probability that y = very likely is the same as the probability that y >= very likely, i.e. 0.12.

P(y>=somewhat likely) is

$1 / (1 + exp(-(-2.3749 + .7249 * 3.26))) = 0.5$

But you'll note that P(y>=somewhat likely) = P(y=somewhat likely) + P(y=very likely). If y>=somewhat likely, y must be either somewhat likely or very likely, and not both at the same time.

So P(y=somewhat likely) = 0.5 - 0.12 = 0.38.

Following the same argument, or just using the fact that the probabilities have to sum to 1, you conclude that P(y=unlikely) = 0..5.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.