Understand the idea
Some outcomes have a natural order but no meaningful numeric distance between levels: 'mild < moderate < severe' has a clear ranking, but there is no principled sense in which the gap from mild to moderate equals the gap from moderate to severe. Ordinal regression respects the ORDER without inventing equal spacing between levels the way treating '1, 2, 3' as literal numbers in an ordinary regression would.
The standard version (proportional-odds) works by imagining a series of thresholds between adjacent categories, and modeling the odds of being ABOVE each threshold versus at or below it. The key simplifying choice: each predictor gets just ONE slope, assumed to apply equally at every threshold, the same multiplier whether you're asking about crossing the mild/moderate line or the moderate/severe line. That one shared odds ratio is what makes the model's output simple: 'a one-unit increase in this predictor multiplies the odds of being in a higher category by 1.2, and that 1.2 applies everywhere along the scale.'
That 'one slope everywhere' assumption (called proportional odds, or parallel lines) is exactly the thing worth checking before trusting the model: if a predictor matters much more for crossing one particular threshold than another, a single shared odds ratio would be a misleading average of two genuinely different effects.
Ordinal regression of this kind is ordered logistic regression, also called the proportional odds model or the cumulative logit model: it models the chance of being at or below each level of an ordered outcome. The key assumption of ordered logistic regression, the parallel lines assumption, is that each predictor has the same effect at every cut point between levels.
Practitioner explanation
KernelStats fits the cumulative-logit proportional-odds model: log(P(Y<=j)/P(Y>j)) = theta_j - (beta_1*X_1 + ...) for K-1 cutpoints theta_1 < ... < theta_{K-1}, with ONE slope beta_k per predictor shared across every threshold. Level ordering is either supplied explicitly (the level-order option, low to high) or inferred automatically (numerically for a numeric-coded outcome, alphabetically for a string outcome), with order_inferred_alphabetically flagged on the card so an accidentally wrong alphabetical ordering (e.g. 'high' sorting before 'low') is visible rather than silently baked in. With this sign convention exp(beta_k) multiplies P(Y>j)/P(Y<=j) at every cutpoint, holding other predictors fixed; it is not an adjacent-category odds ratio or a transition probability.
The proportional-odds assumption is flagged on EVERY fit as a caveat to check, but the product makes a deliberate, stated honesty choice NOT to fabricate a Brant test statistic: statsmodels does not compute the Brant test, and the Learn More content states directly that reporting a number the product cannot verify would violate its own honesty rule; the assumption is named, its consequences and remedies (partial proportional-odds model, multinomial logit, continuation-ratio model) are described, but no invented test statistic appears on the card.
Three tempting-but-wrong alternatives are named explicitly in the product's own guidance, each with its specific flaw: (1) linear regression on the numeric codes invents equal spacing between categories and can predict impossible fractional/out-of-range values; (2) multinomial logistic regression throws away the ordering entirely and estimates far more parameters than necessary; (3) collapsing categories into a binary split (e.g. 'agree or above' vs. 'below agree') discards information and makes the choice of cut point arbitrary. As with the other GLM-family functions, perfect/near-perfect separation is detected and flagged (the separation flag on the card) rather than silently reporting a diverged coefficient.
When to use it
Consider it when
The outcome has three or more ordered categories with a genuine ranking but no meaningful numeric spacing between levels (Likert agreement scales, severity grades, size tiers), and you want each predictor's effect quantified as a single odds ratio for moving up the ranking.
Use caution when
The outcome categories have no natural order (use multinomial logistic regression instead), or a predictor's effect is suspected to differ substantially across different thresholds (the proportional-odds assumption would give a misleading single average odds ratio in that case, and a partial proportional-odds or multinomial model is more appropriate).
Formulas and symbols
Cumulative-logit (proportional-odds) model
theta_1 < ... < theta_{K-1} the K-1 cutpoints on a latent scale for K ordered categories; beta_k a single slope shared across all cutpoints.
Proportional-odds odds ratio
For this theta_j - beta*x convention, exp(beta_k) multiplies P(Y>j)/P(Y<=j) at every threshold j for a one-unit predictor increase, holding other predictors fixed. This is a cumulative odds ratio, not an adjacent-category odds ratio.
McFadden's pseudo-R-squared
Compares full-model log likelihood with the threshold-only null model. It is not ordinary explained-variance R-squared; there is no universal cutoff for an excellent or adequate fit. Check calibration, assumptions and the decision context.
Assumptions and checks
- Proportional odds means each predictor gets exactly ONE odds ratio, shared across every cut-point between adjacent outcome categories; if a predictor's effect on the odds actually differs across thresholds, the single reported odds ratio for that predictor is a compromise that misrepresents its effect at some thresholds.
In KernelStats: Not checked by KernelStats: statsmodels does not compute the Brant test, so this is flagged as a standing caveat rather than tested; verify with R's brant::brant() or by comparing against a non-proportional-odds or multinomial model.
- With too few observations in the rarest outcome category (below roughly 10, or fewer than the number of slope parameters plus one), the cutpoint(s) nearest that category are estimated on very little data and become unstable.
In KernelStats: Checked directly: the card reports the smallest category's observation count and flags it as a warning when below that threshold, recommending merging adjacent rare levels.
- Perfect or quasi-perfect separation (a predictor combination perfectly predicts which side of some threshold a row falls on) sends coefficient estimates and standard errors toward extreme values, so the reported odds ratios and p-values are not trustworthy even though the optimizer may still return a number.
In KernelStats: Checked directly: the card detects possible perfect/quasi separation and flags it as a failed check, reporting the odds ratio and interval for any diverged predictor as 'not reportable' rather than a meaningless extreme number.
Alternatives
- Multinomial Logistic Regression. The outcome categories genuinely have no meaningful order, or the proportional-odds assumption is clearly violated for a key predictor.
- Logistic Regression. The ordered outcome can be meaningfully collapsed to exactly two categories and only that binary distinction matters.
Worked example
Scenario
Modeling a three-level body-size tier derived from body mass (coded 1 = light, 2 = medium, 3 = heavy, so the order is inferred numerically; had the text labels been used, the engine would have sorted them alphabetically as heavy < light < medium unless level_order was set) as a function of flipper length across 342 penguins.
Result
Flipper length OR = 1.34 per mm (95% CI [1.27, 1.42], p < .001); McFadden's R-squared = 0.58; two cutpoints estimated (theta_1, theta_2).
Interpretation
Each additional millimeter of flipper length multiplies the odds of being in a higher body-size tier by 1.34, holding other predictors fixed; this applies at both cut points (medium or heavy versus light, and heavy versus light or medium). It is not the chance of moving up a tier. The single multiplier relies on the proportional-odds assumption, which the card names but does not test.
Dataset: penguins.csv
Common misconceptions
Misconception
Since the outcome categories are already coded as numbers (1, 2, 3, ...), it's simplest and equally valid to just run ordinary linear regression on those codes.
Correction
Treating ordinal codes as literal numbers in a linear regression INVENTS equal spacing between categories that may not exist (is 'agree' really exactly as far from 'neutral' as 'strongly agree' is from 'agree'?), and can predict nonsensical values like 2.7 or 6 on a 1-5 scale. Ordinal regression uses only the RANKING of the categories, never their arbitrary numeric codes, and respects the outcome's true structure.
Misconception
The single proportional-odds ratio reported for a predictor is guaranteed to be an accurate summary of its effect at every threshold.
Correction
The 'one slope for all thresholds' proportional-odds assumption is exactly what needs checking, not something guaranteed by the model's construction. If a predictor's real effect differs substantially between, say, the bottom split and the top split, the single reported odds ratio is a misleading AVERAGE of two genuinely different effects; a partial proportional-odds model or a different approach is needed when this assumption fails.
References
- Regression Models for Ordinal Data, McCullagh, P. (1980), Journal of the Royal Statistical Society, Series B, 42(2), 109-142.
- Categorical Data Analysis, Agresti, A. (2013), 3rd ed., Chapter 8.
- R MASS documentation: Ordered Logistic or Probit Regression (polr), R Core and MASS authors, Details.
- Penn State STAT 504: Multinomial Logistic Regression Models, Penn State Department of Statistics, Lesson 8, Proportional-Odds Cumulative Logit Model.
