Tutorials › Generalized Linear Mixed Models (GLMM) › Multinomial Counts With A Fixed Total

Responses: Binary, Count, Ordinal, Overdispersed · Tutorial 81 of 698

Multinomial Counts With A Fixed Total

You will learn to recognize fixed-total multinomial data, derive its likelihood and dependence structure, and distinguish it from separate Poisson or binomial count responses.

Intermediate 11 min read

What You'll Learn

  • Identify when counts form an exhaustive, mutually exclusive partition of a fixed total.
  • Write the multinomial likelihood and interpret its probabilities and expected counts.
  • Derive the negative covariance between counts in different categories.
  • Explain why separate Poisson or binomial models can misrepresent fixed-total data.
  • Express category probabilities conditionally on random effects in a GLMM.
  • Check category definitions, trial comparability, and fixed-total assumptions.

Why a Fixed Total Changes the Response

Suppose a clinic records how a fixed set of patients is divided among three mutually exclusive discharge destinations. The counts for the destinations cannot vary independently: if more patients are assigned to one destination, fewer remain for the others. This differs from recording the number of events that occur during separate observation windows, where the total number of events may itself vary. The distinction determines the response likelihood, not merely how the data are arranged in a table.

A multinomial response is appropriate when each of a known number of trials contributes to exactly one of several categories, and the recorded counts cover all those trials. The earlier material on binomial counts handles the special case of two categories. With more than two categories, the counts are tied together by their shared total.

Definition: For observational unit \(i\), let \(Y_{ik}\) be the number of trials assigned to category \(k\), for \(k=1,\ldots,K\), and let \(m_i\) be the fixed number of trials. The response is multinomial when the categories are mutually exclusive and exhaustive, so that \(\sum_{k=1}^{K}Y_{ik}=m_i\), and each trial has category probabilities \(\pi_{ik}\), with \(\pi_{ik}\geq 0\) and \(\sum_{k=1}^{K}\pi_{ik}=1\). Under independent trials with the same category probabilities, \((Y_{i1},\ldots,Y_{iK})\sim\operatorname{Multinomial}(m_i;\pi_{i1},\ldots,\pi_{iK})\).

The total \(m_i\) is part of the response structure. It is not an exposure whose event rate is being estimated; it is the number of trials allocated across the listed categories. Each trial must enter exactly one category. If there is an unrecorded or “other” outcome, the categories are not exhaustive unless that outcome is included.

Likelihood and Dependence

For observed counts \(y_{i1},\ldots,y_{iK}\) summing to \(m_i\), the multinomial probability is

$$ P(Y_{i1}=y_{i1},\ldots,Y_{iK}=y_{iK}) = \frac{m_i!}{\prod_{k=1}^{K}y_{ik}!} \prod_{k=1}^{K}\pi_{ik}^{y_{ik}}. $$

The factorial coefficient counts how many trial-level sequences produce the same set of category counts. The product gives the probability of any one such sequence when trials are independent and share the same category probabilities. The likelihood therefore uses the whole count vector and the constraint that its entries sum to \(m_i\).

The mean and variance of each count, and the covariance between distinct category counts, are

$$ E(Y_{ik})=m_i\pi_{ik},\qquad \operatorname{Var}(Y_{ik})=m_i\pi_{ik}(1-\pi_{ik}),\qquad \operatorname{Cov}(Y_{ik},Y_{i\ell})=-m_i\pi_{ik}\pi_{i\ell} \quad (k\ne\ell). $$

The negative covariance follows because a trial counted in category \(k\) cannot also be counted in category \(\ell\). In particular, the total count has no sampling variance when \(m_i\) is fixed. Separate models that treat the category counts as independent do not preserve this feature.

Worked Example: A Fixed Set of Discharge Destinations

Hypothetical data. A clinic classifies 20 patients, each into exactly one of three destinations: home (A), rehabilitation (B), or another facility (C). The observed counts are \((12,5,3)\). Suppose, for illustration, that the category probabilities are \((0.60,0.25,0.15)\). The counts sum to \(12+5+3=20\), as required.

The probability of this particular count vector is

$$ P(Y_A=12,Y_B=5,Y_C=3) = \frac{20!}{12!\,5!\,3!}(0.60)^{12}(0.25)^5(0.15)^3. $$

The coefficient is \(20!/(12!\,5!\,3!)=7{,}054{,}320\), so the expression is \(7{,}054{,}320(0.60)^{12}(0.25)^5(0.15)^3\). The observed proportions, \(12/20=0.60\), \(5/20=0.25\), and \(3/20=0.15\), sum to one and are the likelihood-based estimates of the three probabilities for this single group with no additional model structure.

For category A, the model gives \(\operatorname{Var}(Y_A)=20(0.60)(0.40)=4.8\). For the covariance of A and B, it gives \(\operatorname{Cov}(Y_A,Y_B)=-20(0.60)(0.25)=-3.0\). Thus, these counts have binomial marginal distributions individually, but they are not independent: the fixed total links them.

Why Independent Poisson Counts Are Different

A Poisson response is suited to an event count whose total is not fixed in advance. If \(K\) category counts are modeled as independent Poisson variables, their sum is also random. That is not the sampling structure when every one of \(m_i\) trials must be assigned to exactly one category. There is a useful connection, however: independent Poisson counts become multinomial when we condition on their sum.

To see this, suppose \(Z_1,\ldots,Z_K\) are independent Poisson variables with means \(\lambda_1,\ldots,\lambda_K\), and write \(\Lambda=\sum_k\lambda_k\). For nonnegative counts \(y_k\) summing to \(m\), divide their joint probability by the probability that their sum equals \(m\):

$$ \begin{aligned} P(Z_1=y_1,\ldots,Z_K=y_K\mid \textstyle\sum_k Z_k=m) &= \frac{\prod_k e^{-\lambda_k}\lambda_k^{y_k}/y_k!} {e^{-\Lambda}\Lambda^m/m!}\\ &= \frac{m!}{\prod_k y_k!} \prod_k\left(\frac{\lambda_k}{\Lambda}\right)^{y_k}. \end{aligned} $$

Here \(\prod_k e^{-\lambda_k}=e^{-\Lambda}\) and \(\sum_k y_k=m\), so the remaining powers can be written using \(\lambda_k/\Lambda\). The conditional distribution is multinomial with probabilities \(\pi_k=\lambda_k/\Lambda\). The conditioning is essential: without it, the Poisson model allows a random total and independent counts; the multinomial model has a fixed total and dependent counts.

Worked Example: Conditioning Event Counts on Their Total

Hypothetical data. Consider three independent Poisson counts with means \(4\), \(3\), and \(3\). Their sum has mean \(\Lambda=4+3+3=10\), but is random. If we condition on the sum being exactly 10, the category probabilities are \(4/10=0.40\), \(3/10=0.30\), and \(3/10=0.30\).

For the count vector \((5,3,2)\), which sums to 10, the conditional probability is

$$ \frac{10!}{5!\,3!\,2!}(0.40)^5(0.30)^3(0.30)^2 = 2520(0.40)^5(0.30)^5 = 0.06271. $$

This is the probability of that count vector under the multinomial distribution conditional on a total of 10. The corresponding unconditional independent-Poisson model does not fix the total at 10; it assigns positive probability to other totals as well. A model should match how the observations were generated, rather than use independent Poisson likelihoods merely because the recorded responses are counts.

Multinomial Responses in a GLMM

When observations are clustered, category probabilities may depend on covariates and cluster-specific random effects. A common specification uses one category as a reference and models the other category probabilities through logit contrasts. For example, with category A as reference, one can define

$$ \log\left(\frac{\pi_{ik}}{\pi_{iA}}\right) = \mathbf{x}_i^{\mathsf T}\boldsymbol{\beta}_k + \mathbf{z}_i^{\mathsf T}\mathbf{b}_{ik}, \qquad k\ne A. $$

The probabilities are obtained by normalizing the category weights so that they sum to one. Conditional on the random effects, the count vector for unit \(i\) has a multinomial distribution with total \(m_i\). A GLMM typically specifies a distribution for the random effects and assumes the relevant observational units are conditionally independent given those effects and the covariates. The multinomial dependence among categories within a count vector remains, even conditional on the random effects.

Worked Example: A Cluster Effect Changes Category Probabilities

Hypothetical model. Suppose a clinic's discharge categories are A, B, and C, with A as the reference. For one clinic, let the category contrasts be \(\log(\pi_B/\pi_A)=\log(2/3)+b\) and \(\log(\pi_C/\pi_A)=\log(1/3)\), where \(b\) is a clinic-specific random effect. This is a conditional model; the value of \(b\) in this calculation is chosen only to illustrate how the random effect changes the probabilities.

At \(b=\log 2\), the relative category weights for A, B, and C are \(1\), \((2/3)\exp(\log 2)=4/3\), and \(1/3\). Their sum is \(1+4/3+1/3=8/3\). Dividing each weight by \(8/3\) gives

$$ (\pi_A,\pi_B,\pi_C) = \left(\frac{3}{8},\frac{1}{2},\frac{1}{8}\right). $$

If this clinic contributes \(m_i=8\) patients, the conditional expected counts are \(8(3/8)=3\), \(8(1/2)=4\), and \(8(1/8)=1\). These expectations sum to 8. The probability of observing exactly \((3,4,1)\), conditional on this value of \(b\), is

$$ \frac{8!}{3!\,4!\,1!} \left(\frac{3}{8}\right)^3 \left(\frac{1}{2}\right)^4 \left(\frac{1}{8}\right) = 280\left(\frac{3}{8}\right)^3 \left(\frac{1}{2}\right)^4 \left(\frac{1}{8}\right) \approx 0.1154. $$

The random effect changes the category probabilities but does not change the fixed total of eight. In a fitted GLMM, \(b\) is not generally known; likelihood calculations account for its specified distribution rather than treating an illustrative value as observed.

Assumptions, Diagnostics, and Alternatives

Before using a multinomial response, check the data-generating structure, not just whether the outcome column contains integers. The basic model assumes a fixed, known total for each response vector; categories that are mutually exclusive and collectively exhaustive; and, conditional on the modeled probabilities, independent trials with the same category probabilities within that vector. If probabilities differ across trials because of unmodeled trial-level covariates, the ordinary multinomial likelihood may be inappropriate even though the total is fixed.

A practical diagnostic begins with the category definitions and totals. Confirm that every trial is counted once, no category overlaps another, and the observed counts add to the stated total for every unit. Then check whether categories are sparse, whether important categories have been omitted or combined without justification, and whether the model's fitted probabilities and residual patterns show systematic lack of fit across groups or covariate levels. Sparse categories can make estimated contrasts unstable. Repeated or clustered observations may also require random effects: a multinomial likelihood for each count vector does not by itself account for dependence between different vectors from the same cluster.

The main alternatives correspond to different response processes. For two exhaustive categories, the multinomial reduces to a binomial count, since the second count is \(m_i-Y_{i1}\) and adds no independent information. For unbounded event counts with no fixed number of eligible trials, a Poisson response may be appropriate. Independent Poisson models can also represent a multinomial vector conditional on its total, but they do not impose that total unless the analysis conditions on it. Separate binomial models for each category may reproduce the marginal distribution of each count, but generally ignore their negative dependence and do not ensure that the fitted category probabilities sum to one.

A multinomial model is not automatically suitable merely because a table has several count columns. If the columns count events that can occur repeatedly or overlap, one trial may contribute to several columns, so these are not mutually exclusive categories. If the total is random, a fixed-total multinomial omits meaningful information about how many events occurred. Conversely, treating a known fixed total as random can discard the design constraint and misstate uncertainty. Choose the response family from what each trial can produce and what the total represents.

Common mistake: “Each category count is a count, so I can fit an independent Poisson model to each one.” The correction is to ask whether the category counts partition a fixed total. If they do, their sum cannot vary, and the counts are dependent; use a multinomial response (or an explicitly conditioned equivalent), not independent Poisson likelihoods.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. A fixed set of 15 applicants is classified into exactly one of three decisions: accept, wait-list, or reject. What response structure applies, and what must the three counts sum to?
  2. For a multinomial response with total 12 and probabilities \((0.5,0.3,0.2)\), find the expected count in each category and the covariance between the first and second counts.
  3. Explain why independent Poisson category counts do not, without conditioning, guarantee that their sum equals a known total.
  4. Suppose there are two exhaustive categories and the first has count \(Y_1\) out of \(m\). How is the second count determined, and what familiar count model describes \(Y_1\)?

Solutions. (1) The response is multinomial because each applicant enters exactly one exhaustive category; the counts must sum to 15. (2) The expected counts are \(12(0.5)=6\), \(12(0.3)=3.6\), and \(12(0.2)=2.4\). The covariance is \(-12(0.5)(0.3)=-1.8\) counts squared. (3) Independent Poisson variables each have random values, and their sum is also random; conditioning their sum to equal the known total produces a multinomial distribution. (4) The second count is \(m-Y_1\), and \(Y_1\sim\operatorname{Binomial}(m,p_1)\); the second count contains no additional independent information.

Clinical Biostats