Tutorials › Generalized Linear Models › Diagnosing Parallel Slopes for Categorical Predictors

Ordinal Assumptions and Extensions · Tutorial 556 of 981

Diagnosing Parallel Slopes for Categorical Predictors

Use stratified cumulative proportions and cutpoint-specific log-odds contrasts to assess whether a categorical predictor has a common effect across ordinal response thresholds.

Advanced 11 min read

What You'll Learn

  • Define stratified cumulative probabilities for each predictor group and response cutpoint
  • Calculate empirical upper cumulative log-odds contrasts against a reference group
  • Relate cutpoint-invariant contrasts to the parallel-slopes restriction for a categorical predictor
  • Recognize patterns that suggest nonparallel effects without treating visual inspection as a formal test
  • Identify how zero or sparse cells make empirical contrasts unstable or infinite
  • Use approximate standard errors cautiously when counts are adequate

Why Diagnose Parallel Slopes by Group?

For an ordinal response, a categorical predictor divides observations into groups, such as treatment arms or disease stages. The parallel-slopes assumption says that a group’s effect is the same at every response cutpoint. A practical diagnostic is to calculate the group-specific cumulative probabilities at each cutpoint, convert them to log-odds contrasts against a reference group, and compare those contrasts across cutpoints.

This is a diagnostic, not a substitute for a formal test or a fitted model. Its value is that the calculations are directly interpretable: they show where the groups differ in the response distribution and whether the estimated difference changes as the cutpoint moves.

Stratified Cumulative Probabilities and Contrasts

Suppose the response \(Y\) has ordered categories \(1,\ldots,K\), and a categorical predictor \(G\) has levels including a reference level \(g_0\). For each cutpoint \(j=1,\ldots,K-1\), divide outcomes into those at or below \(j\) and those above \(j\). Within group \(g\), define the upper cumulative probability \(q_{gj}=P(Y>j\mid G=g)\). Its odds compare the probability of being above the cutpoint with the probability of being at or below it.

Definition: The cutpoint-specific upper cumulative log-odds contrast for group \(g\) against reference group \(g_0\) is $$ \Delta_{gj} = \log\!\left(\frac{q_{gj}}{1-q_{gj}}\right) - \log\!\left(\frac{q_{g_0j}}{1-q_{g_0j}}\right). $$ A common effect across thresholds means that, for each nonreference group, \(\Delta_{gj}\) does not depend on \(j\).

For observed data, let \(U_{gj}\) be the number of observations in group \(g\) with \(Y>j\), and let \(L_{gj}\) be the number with \(Y\le j\). If both counts are positive, the empirical upper cumulative log-odds are \(\log(U_{gj}/L_{gj})\), and the empirical contrast is $$ \widehat{\Delta}_{gj} = \log\!\left(\frac{U_{gj}}{L_{gj}}\right) - \log\!\left(\frac{U_{g_0j}}{L_{g_0j}}\right). $$

The reference group matters for interpreting the sign, but not for deciding whether the predictor’s effect is parallel: changing the reference changes the signs and comparisons, not whether each group’s contrast stays constant across cutpoints. With more than two predictor levels, calculate a contrast for every nonreference level.

Connection to the Parallel-Slopes Restriction

For clarity, use the cumulative-logit convention \(\operatorname{logit}P(Y\le j\mid G=g)=\theta_j-\beta_g\), with \(\beta_{g_0}=0\). This is the proportional-odds form for a categorical predictor: the thresholds vary with \(j\), while the group effect does not.

Result: Under this cumulative-logit model, the upper cumulative log-odds contrast for group \(g\) against \(g_0\) equals \(\beta_g\) at every cutpoint. Thus, cutpoint-invariant contrasts are the group-level signature of the parallel-slopes restriction.

To verify the result, note that \(\operatorname{logit}P(Y>j\mid G=g)=-\operatorname{logit}P(Y\le j\mid G=g)\). Therefore, under the stated model,

$$ \operatorname{logit}P(Y>j\mid G=g) =-(\theta_j-\beta_g) =\beta_g-\theta_j. $$

For the reference group the corresponding logit is \(-\theta_j\). Subtracting gives \((\beta_g-\theta_j)-(-\theta_j)=\beta_g\), which does not depend on \(j\). Conversely, if the population upper cumulative log-odds contrasts against the reference are constant across cutpoints, then each group’s cumulative logits can be written as a cutpoint term plus a group-specific constant, which is the same parallel structure in this parameterization. This equivalence concerns the population quantities; empirical contrasts will vary because of sampling variation. \(\square\)

For a diagnostic, the important question is not whether the empirical contrasts are numerically identical. It is whether their pattern is reasonably consistent with a common value, given the sample size and uncertainty. The earlier material on likelihood-ratio and Wald tests addresses formal inference; a plot or table of empirical contrasts is useful for understanding what the data are showing.

Worked Example: Contrasts That Are Approximately Parallel

A four-category outcome is recorded for a reference group \(A\) and a group \(B\). The category counts are \(A=(10,20,30,40)\) and \(B=(12,28,50,90)\). Calculate the empirical upper cumulative log-odds contrast for \(B\) against \(A\) at each cutpoint.

At cutpoint \(j=1\), group \(A\) has \(U_{A1}=90\) and \(L_{A1}=10\); group \(B\) has \(U_{B1}=168\) and \(L_{B1}=12\). Thus $$ \widehat{\Delta}_{B1} =\log(168/12)-\log(90/10) =\log(14/9) \approx 0.442. $$

At \(j=2\), the upper and lower counts are \(70,30\) for \(A\) and \(140,40\) for \(B\). Hence $$ \widehat{\Delta}_{B2} =\log(140/40)-\log(70/30) =\log(3.5/(7/3)) =\log(1.5) \approx 0.405. $$

At \(j=3\), the counts are \(40,60\) for \(A\) and \(90,90\) for \(B\), giving $$ \widehat{\Delta}_{B3} =\log(90/90)-\log(40/60) =\log(1/(2/3)) =\log(1.5) \approx 0.405. $$

The three contrasts, \(0.442, 0.405,\) and \(0.405\), are close. They are consistent with a roughly common positive group effect: at each cutpoint, the observed upper cumulative odds are higher in group \(B\). This small table does not prove the parallel-slopes assumption; it illustrates a pattern that would not, by itself, raise a strong concern about it.

Reading Patterns Across Cutpoints

A useful display puts one row per group contrast and one column per cutpoint. Plotting the contrasts against the cutpoint can make the pattern easier to see. A roughly horizontal sequence suggests a common effect; a systematic rise, fall, or change in sign suggests that the group difference depends on which division of the outcome is being considered. Always inspect the cumulative proportions as well as the contrasts: the proportions show the underlying distributions, while the contrasts put the group differences on a log-odds scale.

For a categorical predictor with several levels, inspect each level against the chosen reference. Similarity for one contrast does not imply similarity for all the others. Also, these are stratified, unadjusted comparisons: if other predictors differ across groups and are relevant to the analysis, the stratified pattern need not match a conditional model’s group effect.

Worked Example: Contrasts That Change Across Thresholds

Use the same reference group \(A=(10,20,30,40)\), but suppose group \(B\) has counts \(B=(5,45,40,10)\). At \(j=1\), the upper and lower counts are \(90,10\) for \(A\) and \(95,5\) for \(B\). Therefore, $$ \widehat{\Delta}_{B1} =\log(95/5)-\log(90/10) =\log(19/9) \approx 0.747. $$

At \(j=2\), group \(A\) has upper and lower counts \(70,30\), while \(B\) has \(50,50\). The contrast is $$ \widehat{\Delta}_{B2} =\log(50/50)-\log(70/30) =\log(3/7) \approx -0.847. $$

At \(j=3\), the counts are \(40,60\) for \(A\) and \(10,90\) for \(B\). Thus $$ \widehat{\Delta}_{B3} =\log(10/90)-\log(40/60) =\log(1/6) \approx -1.792. $$

The contrast changes from positive to negative and then becomes more negative. This is a pronounced nonparallel pattern in these empirical summaries: the comparison favors \(B\) for the first upper-tail split but favors \(A\) for the later splits. The pattern merits investigation, but it is not by itself a formal rejection. In a small sample, even visibly different contrasts can be noisy.

Uncertainty and Sparse Cells

At a fixed cutpoint, the variance of an estimated contrast can be approximated when all four relevant upper and lower counts are sufficiently large. To see the approximation, within a group the upper count is binomial with sample size \(n_g\) and probability \(q_{gj}\), because each observation either exceeds the cutpoint or does not. The estimated log-odds is \(\log\{\hat q_{gj}/(1-\hat q_{gj})\}\). The derivative of the logit function is \(1/[q(1-q)]\), so the delta method gives approximate variance \(1/[n_gq_{gj}(1-q_{gj})]\). Replacing the unknown probability by its estimate yields \(1/U_{gj}+1/L_{gj}\). For independent groups, variances of the two group log-odds add, giving

$$ \widehat{\operatorname{Var}}(\widehat{\Delta}_{gj}) \approx \frac{1}{U_{gj}}+\frac{1}{L_{gj}} +\frac{1}{U_{g_0j}}+\frac{1}{L_{g_0j}}. $$

This approximation is a local, large-count calculation, not a reliable remedy for zeros or tiny cells. It also applies to one cutpoint at a time. Contrasts at different cutpoints use overlapping cumulative counts, so their estimates are dependent; do not treat a list of cutpoint estimates as independent observations. \(\square\)

Worked Example: A Zero Cell Makes a Contrast Infinite

Suppose a three-category response has counts \(R=(18,2,0)\) in reference group \(R\) and \(T=(15,0,5)\) in group \(T\). At the first cutpoint, group \(R\) has upper-to-lower odds \(2/18\), while group \(T\) has odds \(5/15\). The contrast is finite: $$ \widehat{\Delta}_{T1} =\log(5/15)-\log(2/18) =\log(3) \approx 1.099. $$

At the second cutpoint, no observation in group \(R\) is above the cutpoint: \(U_{R2}=0\). Its empirical upper log-odds is \(\log(0/20)\), which is negative infinity. Group \(T\)’s upper odds are \(5/15\), so the empirical contrast for \(T\) against \(R\) is positive infinity. That value is a consequence of the observed zero, not evidence that the population effect is literally infinite.

For illustration only, adding \(0.5\) to each of the four upper and lower counts at this cutpoint gives the finite contrast $$ \log(5.5/15.5)-\log(0.5/20.5) =\log(14.548\ldots) \approx 2.677. $$ This continuity adjustment changes the diagnostic and is not a neutral fix. Report the zero cell and the resulting instability rather than presenting an adjusted number as if it were the original empirical contrast. Sparse categories may call for more data, careful subject-matter consideration of category definitions, or appropriate model-based analysis.

Common Mistakes and Practical Use

  • Comparing category proportions instead of cumulative splits. The parallel-slopes restriction concerns cumulative odds at each cutpoint. A single category proportion is not the corresponding contrast.
  • Mixing the direction of the odds. This tutorial uses odds of being above \(j\). Using odds of being at or below \(j\) reverses every contrast’s sign. Either direction is usable, but the definition must stay consistent.
  • Calling close estimates proof of proportional odds. Empirical contrasts vary by chance. Their uncertainty and the sample size matter, and formal inference requires an appropriate test or model comparison.
  • Interpreting an infinite estimate as an infinite population effect. A zero cell makes the raw log-odds contrast undefined or infinite. It signals limited information at that split.
  • Ignoring group composition. Stratified contrasts are unadjusted comparisons. Differences in other predictors can affect the pattern and should be considered when interpreting it.

The main practical lesson is to make the diagnostic concrete: tabulate group counts by response category, calculate the cumulative upper proportions at every cutpoint, and compare the resulting log-odds contrasts. A roughly stable pattern supports using parallel slopes as a working assumption; a marked pattern of change is a reason to examine the assumption more closely, not an automatic verdict.

Check Your Understanding

Answer these questions using the definitions and diagnostic logic above.

  1. For a four-category response, how many cumulative cutpoints are used, and what two sets of outcomes form each split?
  2. Why does the cumulative-logit model \(\operatorname{logit}P(Y\le j\mid G=g)=\theta_j-\beta_g\) imply a constant upper cumulative log-odds contrast?
  3. What does a change in sign across the cutpoint-specific contrasts suggest, and why is it not automatically a formal test result?
  4. At a cutpoint, one group has no observations above the threshold. What happens to its empirical upper log-odds, and what should you avoid concluding?
  5. Why should contrasts at different cutpoints not be treated as independent estimates?
Clinical Biostats