Class 15 · Ordinal Regression
STAT 517: Advanced Statistical Models · Fall 2026
This interactive companion follows Chapter 11 and the reviewed class15_ordinal_regression.R. The graduate-school example fits a cumulative link model to an ordered response with three levels; the coal-miner example fits a continuation-ratio model to a hierarchical response.
Press Run Code on each box in order. Later boxes reuse earlier objects, and you can edit a box and run it again. Both data files are included and the packages load in your browser; the first run takes longer while ordinal and VGAM load. Questions 11.1–11.3 match the handout; Question 11.1 is the in-class lab, whose group assignments and submission template are posted where the instructor hosts the lab threads.
Goals
- Define cumulative probabilities for an ordered response and see why they are nested.
- Specify a cumulative link model with \(K-1\) thresholds and one shared slope vector.
- Read
clm()output: thresholds versus slopes, and the direction of a positive coefficient. - Interpret an adjusted odds ratio as the odds of a higher category.
- Recover class probabilities from cumulative probabilities, and compare links by AIC.
- Fit a continuation-ratio model and recover class probabilities from the continuation ratios.
Start here
Run this box once. ordinal fits the cumulative link models of Part 1; Part 2 loads VGAM for the continuation-ratio model.
Part 1 · Cumulative link models
1. Graduate-school data and the ordered response
There are 400 students. The response apply has three ordered levels, unlikely < somewhat likely < very likely, so a model should use the order rather than treat the levels as nominal. Two choices matter and they are different decisions: the response levels must be declared ordered, and nograd is the reference level of the predictor pared.
GPA by response category, for each combination of pared and private:
2. Fit the cumulative logit (proportional-odds) model
With class probabilities \(p_{i\ell}\), the cumulative probabilities are \(\gamma_{i\ell} = P(y_i \le \ell \mid \mathbf{x}_i) = p_{i1} + \cdots + p_{i\ell}\). They are nested, \(\gamma_{i1} \le \gamma_{i2} \le \gamma_{i3} = 1\), and the cumulative logit model is
\[ \operatorname{logit}\,\gamma_{i\ell} = \alpha_\ell - (\beta_1 x_{i1} + \cdots + \beta_p x_{ip}), \qquad \ell = 1, \ldots, K-1 . \]
Only the thresholds \(\alpha_1 \le \cdots \le \alpha_{K-1}\) depend on \(\ell\); the slopes are shared by every cumulative logit, which is the proportional-odds assumption. Because the slopes enter with a minus sign, a positive \(\beta_j\) means that larger \(x_j\) goes with higher categories, and \(e^{\beta_j}\) multiplies the odds of a higher category rather than a lower one. clm() reports \(\boldsymbol\beta\) on exactly this scale.
- Specify. From the model statement alone, write the two cumulative logit equations for
apply ~ pared + private + gpa. How many parameters does the model have, and how many would the baseline-category model of Chapter 10 need for the same predictors? - Match. Locate \(\widehat\alpha_1\), \(\widehat\alpha_2\), and the shared slopes in the output below. Check that \(\widehat\alpha_1 \le \widehat\alpha_2\) and explain why this must hold for any fit.
- Interpret
pared. Interpret its adjusted odds ratio and 95% interval, naming the event whose odds change and the covariates held fixed. - Interpret
gpa. Do the same for a one-point increase in GPA, then say in one sentence what proportional odds lets you claim about both splits at once.
Read the output carefully. The block Threshold coefficients holds \(\widehat\alpha_1 = 2.2033\) and \(\widehat\alpha_2 = 4.2988\); they are class-specific intercepts, not predictor effects, and they are not exponentiated. The block Coefficients holds the single slope vector shared by both cumulative logits.
Model sentence, for private: for students who attend a private university, we expect the odds of being more likely to apply to graduate school to be about 5.7% lower than the odds for students at a public university, after controlling for the other covariates; the interval for the odds ratio contains 1 and \(p = 0.8438\), so the association is not statistically significant.
3. Other links: probit and cloglog
The same cumulative structure works with any increasing link. The probit and complementary log-log links give no odds-ratio interpretation, so inference uses the signs of the coefficients and whether their intervals contain 0. AIC() compares the three fits.
All three links reach the same conclusions about which predictors are associated with the response. The cumulative logit model has the smallest AIC here and is the only one with interpretable odds ratios.
4. From cumulative to class probabilities
type = "prob" differences the fitted cumulative probabilities for us: \(p_{i1} = \gamma_{i1}\), \(p_{i2} = \gamma_{i2} - \gamma_{i1}\), and \(p_{i3} = 1 - \gamma_{i2}\). Each row is a full probability vector and sums to one.
Student 1 has a parent with a graduate degree, attends a public college, and has GPA 3.6. Using the fitted thresholds and slopes above:
- Calculate \(\widehat\gamma_1 = \widehat P(\texttt{apply} \le \text{unlikely})\) and \(\widehat\gamma_2 = \widehat P(\texttt{apply} \le \text{somewhat likely})\).
- Convert them into the three class probabilities and check that they sum to one.
- Which category has the largest probability? How confident does the full probability vector make you about assigning that single label?
Complete the calculation by hand first, then add a predict() line to the box below to check your numbers.
5. Cumulative probabilities as stacked bands
The box below draws the two fitted cumulative curves against GPA for a student with a graduate-degree parent at a public college, as in Figure 11.1 of the notes. The curves can never cross, because \(\gamma_1 \le \gamma_2 \le 1\) at every GPA, and the height of each shaded band is a class probability.
Explore: change pared = "grad" to "nograd" and rerun. Which way do both curves move, and why do they move together?
6. Probability curves across GPA
For every combination of pared and private, P(unlikely) falls with GPA while the other two probabilities rise; the very likely curve rises faster for students with a graduate-degree parent.
Explore: replace cumlogit.mod with cumprobit.mod in the box above. The curves change shape slightly, but their ordering does not.
Part 2 · Hierarchical responses and continuation ratios
7. Coal-miner data and the continuation-ratio model
The degree of pneumoconiosis (black lung disease) in 360 coal workers is recorded as normal, mild, or severe, against years of exposure. The response is hierarchical: mild and severe arise only among workers who developed the disease. The continuation ratios condition on reaching a split:
\[ P(y > 1 \mid y \ge 1) = P(\text{disease}), \qquad P(y > 2 \mid y \ge 2) = P(\text{severe} \mid \text{disease}). \]
VGAM::cratio fits one logit per split, each with its own intercept and, by default, its own exposure slope (suffixes :1 and :2). A positive slope again means higher odds of the higher outcome at that split.
All 98 workers with 6 years of exposure were normal; of those with 46 years, 12 were normal, 6 mild, and 10 severe. The row Exposure:1 concerns developing the disease at all; Exposure:2 concerns severe rather than mild disease given disease. A Hauck-Donner effect message for (Intercept):1 is expected and does not change the estimates.
- Interpret the odds ratios for
Exposure:1andExposure:2, stating the conditional event each one concerns, and use their 95% intervals to say which associations are statistically significant. - Patient 2 has 42 years of exposure. Calculate both fitted continuation ratios \(\widehat q_1\) and \(\widehat q_2\) from the coefficients, then recover the three class probabilities and check that they sum to one.
Exposure:2is not statistically significant. Does that mean exposure is unrelated to the probability of severe disease? Use \(P(\text{severe}) = q_1 q_2\) in your answer.
8. Predictions for new patients
type = "response" recovers the three class probabilities from the two fitted continuation ratios: \(p_{\rm normal} = 1 - q_1\), \(p_{\rm mild} = q_1(1 - q_2)\), and \(p_{\rm severe} = q_1 q_2\).
Complete Question 11.3, part 2, by hand first, then add a predict() line to the box below to check your numbers.
The fitted class probabilities over the observed range of exposure:
As exposure increases, P(normal) falls from near 1 at 6 years to about 0.4 at 46 years, while the mild and severe probabilities both rise and stay close to each other until about 40 years. Exposure separates disease from no disease but does little to separate severe from mild disease among those who have it.
Optional · Check the parallel-slopes assumption
The proportional-odds model gives each predictor the same coefficient at every cumulative split. nominal_test() relaxes that for one predictor at a time and reports a likelihood-ratio test of the relaxation; nominal = ~ private fits the partial proportional-odds model for the predictor you choose.
Small differences across thresholds rarely justify the extra parameters, but severe non-parallelism makes one common odds ratio misleading.
Optional · A continuation-ratio model is two logistic regressions
Because each continuation ratio conditions on reaching its split, the continuation-ratio logit model with separate slopes is the same as fitting an ordinary binary logistic regression at each split on the workers who reached it. Compare the estimates with cratio.mod.
vglm(..., cratio(parallel = TRUE)) would force one common exposure slope across both splits, which the two separate glm() fits cannot do.
Check your understanding
- Declare the response ordered and, separately, choose each predictor’s reference level.
- Count the parameters: \(K-1\) thresholds plus one slope vector, not one vector per logit.
- State which event’s odds an odds ratio describes: a higher category rather than a lower one.
- Recover class probabilities by differencing cumulative probabilities, or by multiplying continuation ratios.
- Read
Exposure:1andExposure:2as different conditional events before interpreting either.