Tutorials › Generalized Linear Models › Covariate Models for Adjacent-Category Logits

Alternative Nominal Models · Tutorial 511 of 981

Covariate Models for Adjacent-Category Logits

Build a separate log-odds equation for each neighboring category pair, then calculate the resulting category probabilities at chosen covariate values.

Advanced 10 min read

What You'll Learn

  • Define adjacent-category logits using an explicit category ordering and odds direction
  • Specify a distinct intercept and slope vector for each neighboring pair
  • Reconstruct category probabilities from fitted adjacent odds
  • Verify the reconstructed probabilities by checking their sum and adjacent ratios
  • Calculate fitted probabilities for several covariate values

Why Model Neighboring Categories Separately?

For an ordered response, such as symptom severity recorded as none, mild, moderate, or severe, a model can focus on odds between neighboring categories. A covariate model makes each of these local odds depend on predictors. This gives a direct way to describe how the distribution changes across the ordered categories without requiring all neighboring transitions to have the same covariate effects.

The central specification is a set of linked equations: one equation for categories 1 and 2, another for categories 2 and 3, and so on. Each equation has its own intercept and its own slope coefficients. Once the covariate values are supplied, the equations determine adjacent odds; those odds in turn determine all category probabilities after normalization.

Definition: Let an ordered response \(Y\) have categories \(1,\ldots,J\), where \(J\geq 2\). Write \(\pi_j(x)=P(Y=j\mid x)\) for the probability of category \(j\) at covariate vector \(x=(x_1,\ldots,x_q)^T\). The adjacent-category logit for pair \(j,j+1\) is $$ \log\left\{\frac{\pi_{j+1}(x)}{\pi_j(x)}\right\},\qquad j=1,\ldots,J-1. $$ The covariate model specifies this logit as \(\alpha_j+x^T\beta_j\), where \(\alpha_j\) is a pair-specific intercept and \(\beta_j=(\beta_{j1},\ldots,\beta_{jq})^T\) is a pair-specific slope vector.

The odds direction matters: here each equation models the probability of the higher-numbered category relative to the lower-numbered category. Reversing the ratio would negate the corresponding intercept and slopes. The categories must also have a meaningful, stated order; relabeling them changes which pairs count as neighbors.

In the unrestricted covariate model, every pair may have different slopes. For example, the effect of a predictor on the odds of category 2 rather than 1 need not equal its effect on the odds of category 3 rather than 2. This flexibility is part of the specification, not a conclusion about the data. A model with fewer restrictions can require more parameters, but the equations themselves are straightforward to state.

From Adjacent Logits to Probabilities

The equations specify ratios, not probabilities one at a time. To recover probabilities, first exponentiate each logit to obtain the adjacent odds \(r_j(x)=\exp\{\alpha_j+x^T\beta_j\}\). Start with an arbitrary weight of 1 for category 1, then multiply successively by the adjacent odds. Finally divide every weight by their sum.

Theorem: Suppose all \(J-1\) adjacent logits \(\eta_j(x)=\alpha_j+x^T\beta_j\) are finite at a given \(x\). Define \(w_1(x)=1\) and, for \(k=2,\ldots,J\), $$ w_k(x)=\exp\left\{\sum_{j=1}^{k-1}\eta_j(x)\right\}. $$ Then the unique probability vector with these adjacent logits is $$ \pi_k(x)=\frac{w_k(x)}{\sum_{m=1}^J w_m(x)},\qquad k=1,\ldots,J. $$

Proof. Each weight is positive because it is an exponential, and the finite sum \(W(x)=\sum_{m=1}^Jw_m(x)\) is positive. Thus the displayed \(\pi_k(x)\) are positive and sum to 1. For every \(j=1,\ldots,J-1\), the recursive weights satisfy \(w_{j+1}(x)=w_j(x)\exp\{\eta_j(x)\}\). Normalization cancels in their ratio, so

$$ \log\left\{\frac{\pi_{j+1}(x)}{\pi_j(x)}\right\} =\log\left\{\frac{w_{j+1}(x)}{w_j(x)}\right\} =\eta_j(x). $$

To establish uniqueness, suppose another positive probability vector has the same adjacent logits. Its successive ratios imply that its \(k\)th probability equals its first probability times \(w_k(x)\). Since its probabilities sum to 1, its first probability must be \(1/W(x)\); hence every probability equals \(w_k(x)/W(x)\). This proves the result. \(\square\)

The cumulative sum in the exponent is important. The odds for category \(k\) relative to category 1 are not just the \(k-1\)th adjacent odds; they are the product of all adjacent odds along the path from 1 to \(k\). In symbols, \(\pi_k(x)/\pi_1(x)=\prod_{j=1}^{k-1}r_j(x)\). This is why the weights accumulate the logits.

Worked Example: Three Categories With One Covariate

Suppose \(Y\) has three ordered categories and one covariate \(x\). Let \(\eta_1(x)=-0.2+0.5x\) and \(\eta_2(x)=0.4-0.3x\). Calculate the fitted category probabilities at \(x=1\).

First evaluate both logits: \(\eta_1(1)=-0.2+0.5=0.3\), and \(\eta_2(1)=0.4-0.3=0.1\). The adjacent odds are \(r_1=e^{0.3}\approx1.3499\) and \(r_2=e^{0.1}\approx1.1052\).

The weights are \(w_1=1\), \(w_2=e^{\eta_1}=e^{0.3}\approx1.3499\), and \(w_3=e^{\eta_1+\eta_2}=e^{0.4}\approx1.4918\). Their sum is \(W=1+1.3498588+1.4918247=3.8416835\). Therefore

$$ (\pi_1,\pi_2,\pi_3) =\left(\frac{1}{3.8416835}, \frac{1.3498588}{3.8416835}, \frac{1.4918247}{3.8416835}\right) \approx(0.2603,0.3514,0.3883). $$

The rounded probabilities sum to 1.0000. Their adjacent ratios are approximately \(0.3514/0.2603=1.3500\) and \(0.3883/0.3514=1.1050\); small discrepancies from 1.3499 and 1.1052 arise from rounding the probabilities. The unrounded ratios equal \(e^{0.3}\) and \(e^{0.1}\) exactly by construction.

Separate Slopes in a Multi-Covariate Model

With \(q\) predictors, each adjacent pair gets a linear predictor containing all \(q\) predictors. The index \(j\) marks the pair, while the index \(s\) marks a predictor. Thus \(\beta_{js}\) is the slope for predictor \(s\) in the equation for pair \(j,j+1\). The intercepts are also indexed by pair. This prevents an accidental assumption that a single equation or one common slope governs all transitions.

$$ \eta_j(x)=\alpha_j+\sum_{s=1}^q x_s\beta_{js}, \qquad j=1,\ldots,J-1. $$

At a specified covariate vector, calculate every \(\eta_j\), exponentiate to get the adjacent odds, form the cumulative weights, and normalize. This is a deterministic prediction step: it uses the stated parameter values and covariates, not observed category counts.

Worked Example: Four Categories With Two Covariates

For four categories, suppose the predictors are \(x_1,x_2\), and the pair-specific equations are \(\eta_1=\log(2)+0.2x_1+0.1x_2\), \(\eta_2=\log(0.5)-0.1x_1+0.2x_2\), and \(\eta_3=\log(1.5)+0.3x_1-0.2x_2\). Find the probabilities at \((x_1,x_2)=(1,0)\).

Substitution gives \(\eta_1=\log(2)+0.2\), \(\eta_2=\log(0.5)-0.1\), and \(\eta_3=\log(1.5)+0.3\). The odds are respectively \(2e^{0.2}\approx2.4428055\), \(0.5e^{-0.1}\approx0.4524187\), and \(1.5e^{0.3}\approx2.024788\).

The cumulative weights are \(w_1=1\), \(w_2=e^{\eta_1}=2e^{0.2}\approx2.4428055\), \(w_3=e^{\eta_1+\eta_2}=e^{0.1}\approx1.1051702\), and \(w_4=e^{\eta_1+\eta_2+\eta_3}=1.5e^{0.4}\approx2.2377371\). In the third weight, the constants \(2\) and \(0.5\) multiply to 1; in the fourth, their product with \(1.5\) is \(1.5\). The weight sum is \(W\approx6.7857128\).

Dividing each weight by this sum gives \((\pi_1,\pi_2,\pi_3,\pi_4)\approx(0.1474,0.3600,0.1629,0.3298)\). These displayed values sum to 1.0001 because of rounding. Before rounding, the probabilities sum to 1. The reconstructed odds also check: \(w_2/w_1\approx2.4428\), \(w_3/w_2\approx0.4524\), and \(w_4/w_3\approx2.0248\), matching the three exponentiated logits.

A Useful Consequence of the Linear Specification

The logit equations also show exactly how a change in covariates changes a particular adjacent odds. This statement concerns the odds in one pair; it does not by itself say that every category probability changes in the same direction, since all probabilities share the normalization denominator.

Result: For any two covariate vectors \(x\) and \(x+d\), the ratio of the adjacent odds for pair \(j,j+1\) at these two covariate values is $$ \frac{\pi_{j+1}(x+d)/\pi_j(x+d)} {\pi_{j+1}(x)/\pi_j(x)} =\exp\{d^T\beta_j\}. $$

Derivation. By the model, the adjacent odds at \(x\) are \(\exp\{\alpha_j+x^T\beta_j\}\), and at \(x+d\) they are \(\exp\{\alpha_j+(x+d)^T\beta_j\}\). Dividing cancels the intercept and the terms involving \(x\):

$$ \frac{\exp\{\alpha_j+(x+d)^T\beta_j\}} {\exp\{\alpha_j+x^T\beta_j\}} =\exp\{d^T\beta_j\}. $$

Thus each pair has its own covariate-dependent change, through its own slope vector. In particular, changing one predictor while holding the rest fixed selects the corresponding component of \(\beta_j\). This relationship is useful when checking a model specification and when comparing predictions at different covariate values.

Worked Example: Predicting at Two Values of a Covariate

Consider three categories and a single predictor \(x\), with \(\eta_1(x)=\log(1.5)+0.2x\) and \(\eta_2(x)=\log(0.8)-0.1x\). Compute probabilities at \(x=0\) and \(x=1\).

At \(x=0\), the adjacent odds are \(1.5\) and \(0.8\), so the weights are \(1\), \(1.5\), and \(1.5(0.8)=1.2\). Their sum is \(3.7\), giving \((\pi_1,\pi_2,\pi_3)=(1/3.7,1.5/3.7,1.2/3.7)\approx(0.2703,0.4054,0.3243)\).

At \(x=1\), the adjacent odds are \(r_1=1.5e^{0.2}\approx1.8321\) and \(r_2=0.8e^{-0.1}\approx0.7239\). The weights are \(1\), \(1.8321\), and their product \(r_1r_2=1.2e^{0.1}\approx1.3262\). The sum is approximately \(4.1583\), so \((\pi_1,\pi_2,\pi_3)\approx(0.2405,0.4406,0.3189)\).

The odds for pair 1 have been multiplied by \(e^{0.2}\), while those for pair 2 have been multiplied by \(e^{-0.1}\), as the two slope coefficients prescribe. The probabilities are obtained only after all the weights are normalized together.

Common Mistakes and Practical Checks

Several errors are easy to make when moving between a model equation and predicted probabilities. A reliable calculation keeps the category order, the odds direction, and the cumulative weight construction visible at every step.

  • Reversing the odds. The specification here uses \(\pi_{j+1}/\pi_j\). Using \(\pi_j/\pi_{j+1}\) without negating the linear predictor reverses the model.
  • Using only the last adjacent odds for a category weight. The weight for category \(k\) uses the product of every adjacent odds from pair 1 through pair \(k-1\).
  • Normalizing each pair separately. There is one common denominator, the sum of all \(J\) weights. Pairwise denominators do not generally produce probabilities that sum to 1.
  • Assuming a common slope without stating it. In this specification, \(\beta_j\) can differ across pairs. Setting some or all slope vectors equal is an additional restriction, not part of the unrestricted model defined here.
  • Expecting rounded ratios to match exactly. Check ratios using unrounded weights or probabilities; rounding intermediate values can create visible discrepancies.

For a final numerical check, confirm that every fitted probability is positive, that their unrounded sum is 1, and that each adjacent probability ratio reproduces the odds obtained by exponentiating its linear predictor. These checks catch most indexing and arithmetic errors.

Check Your Understanding

Use the odds direction and weight construction defined above.

  1. For \(J\) categories, how many adjacent-logit equations are specified, and what parameters appear in each equation?
  2. For three categories with adjacent odds \(r_1=2\) and \(r_2=0.5\), write the three unnormalized weights and calculate the normalized probabilities.
  3. Explain why the weight for category 4 contains the product of three adjacent odds in a four-category model.
  4. If \(x\) increases by one unit in a single-predictor model, by what factor does the adjacent odds for pair \(j,j+1\) change?
  5. Give two checks that can be used to detect an error in calculated fitted probabilities.
Clinical Biostats