Why Check Sparse Ordinal Categories?
An ordinal GLMM can reproduce the overall distribution of responses while predicting one infrequent category poorly. This matters when that category represents a clinically or scientifically important state, or when its probability is used for prediction. A category seen only a few times is also difficult to assess with a large-sample goodness-of-fit test: the usual approximations may be unreliable, and one unusual observation can have a large effect on the apparent discrepancy.
A direct diagnostic is to compare the observed frequency of each category with frequencies generated from the fitted model. Cumulative proportions provide a complementary view: they compare the numbers at or below each ordinal threshold. The two views help show whether a discrepancy is isolated to a rare category or is part of a broader shift in the ordinal distribution.
Model and Diagnostic Quantities
Suppose \(Y_{ij}\) is the ordinal outcome for observation \(j\) in cluster \(i\), with possible categories \(1,\ldots,K\). For a cumulative-logit random-intercept model, one common specification is
Here \(\theta_1<\cdots<\theta_{K-1}\) are cutpoints, \(x_{ij}\) is the predictor vector, \(\beta\) is the fixed-effect coefficient vector, and \(b_i\) is a cluster random intercept with its specified distribution. Other ordinal GLMMs may use a different link or random-effects structure; the frequency checks below use the fitted model’s category probabilities and do not require this particular link.
Let \(Y_{ij}^{(r)}\) be the outcome in replicated data set \(r\), generated under the fitted model for the observed design, with \(r=1,\ldots,B\). Calculate \(O_k^{(r)}\), \(A_k^{(r)}\), and \(A_k^{(r)}/n\) in every replication. The observed count or proportion can then be placed beside the distribution of its replicated counterpart: for example, its simulated mean, standard deviation, and central predictive interval. A replication must preserve the cluster structure relevant to the question. Conditional replications assess outcomes for the fitted clusters, while unconditional replications include new draws of the random effects and address variation across clusters in the population. Choose the type to match the prediction target rather than selecting whichever gives a more reassuring comparison.
Why the Two Views Are Complementary
For a cumulative-link model, write \(F_{ij,k}(b_i)=P(Y_{ij}\leq k\mid b_i)\), with \(F_{ij,0}(b_i)=0\) and \(F_{ij,K}(b_i)=1\). The conditional probability of category \(k\) is the difference between adjacent cumulative probabilities:
If the target is a population-average prediction, integrate this probability over the random-effects distribution to obtain \(q_{ij,k}\). The expected category frequency is then \(\sum_{ij}q_{ij,k}\). The justification is simple: \(O_k\) is a sum of indicator variables, and linearity of expectation gives \(E(O_k)=\sum_{ij}E\{I(Y_{ij}=k)\}=\sum_{ij}P(Y_{ij}=k)\). This calculation does not require the outcomes to be independent. In practice, simulation is useful because it also gives the distribution of the counts while retaining the dependence induced by shared random effects.
Cumulative frequencies reorganize the same outcomes around the ordered cutpoints. Because \(A_k=\sum_{\ell=1}^{k}O_\ell\), a discrepancy in several adjacent category counts can show up as a systematic difference at one or more thresholds. But these checks are not independent: cumulative frequencies overlap, and the category counts must sum to \(n\). Treat them as related diagnostic views, not as separate independent tests.
Worked Example: A Rare Category That Is Not Clearly Misfit
Suppose a hypothetical ordinal response has four categories and is recorded for \(n=80\) observations. The observed counts are \((5,19,34,22)\). Across \(B=1{,}000\) replicated data sets, the average counts are \((8,20,32,20)\), and the simulated standard deviation for category 1 is 2.5. The observed and average counts both sum to 80, as they should.
For category 1, the observed-minus-replicated-mean difference is \(5-8=-3\) responses. In simulated-standard-deviation units, this is
Suppose the central 95% simulation interval for category 1 is 3 to 13, and 43 of the 1,000 replications have a category-1 count no greater than 5. The observed count is inside the interval, and the lower-tail fraction is \(43/1000=0.043\). This is a relatively low simulated count, but it is not by itself decisive evidence of model failure—especially when several categories and thresholds are being inspected. The interval is a predictive comparison for replicated counts, not a confidence interval for a model parameter.
Reading Cumulative Proportions
Category counts answer, “How often did each exact response occur?” Cumulative proportions answer, “How often was the response at or below each threshold?” The latter can reveal an overall tendency toward lower or higher categories that is harder to see by looking at a single rare category. Compare observed cumulative proportions with the simulated distribution at each threshold, and look for a coherent pattern rather than counting every threshold as a separate discovery.
Worked Example: Comparing Cumulative Thresholds
In a hypothetical data set of \(n=120\) responses across four categories, the observed counts are \((8,24,54,34)\). The mean replicated counts are \((6,22,50,42)\). The cumulative observed counts through categories 1, 2, and 3 are \(8\), \(8+24=32\), and \(8+24+54=86\). Their proportions are
The cumulative replicated means are \(6\), \(6+22=28\), and \(6+22+50=78\), giving proportions \((0.0500,\,0.2333,\,0.6500)\). The observed-minus-replicated differences in cumulative counts are \(2\), \(4\), and \(8\), or \(0.0167\), \(0.0333\), and \(0.0667\) in proportion units.
Suppose the simulated standard deviations of the three cumulative counts are \(2.5\), \(5\), and \(7\). The standardized differences are \(2/2.5=0.80\), \(4/5=0.80\), and \(8/7=1.14\). All three observed cumulative counts lie within their respective central 95% simulation intervals, say \([2,11]\), \([17,40]\), and \([63,94]\). The pattern suggests somewhat more observations below each threshold than the replicated means, but these discrepancies are modest relative to simulated variation. It would be inappropriate to call each threshold a separate significant result.
Checking a Particularly Rare Category
When an exact category is rare, its predictive distribution may be strongly skewed and concentrated on a few integer values. A mean and standard deviation can summarize that distribution, but the empirical interval and tail fraction are often more informative. Always inspect the counts themselves: a simulated mean of 1.1 does not imply that a count of 1.1 is possible in any individual data set.
Worked Example: An Unusually Frequent Top Category
Consider a hypothetical four-category outcome observed for \(n=60\) observations. The counts are \((18,24,14,4)\), so the rare top category occurs four times. In 1,000 model replications, suppose the mean counts are \((17,25,16.9,1.1)\). These means sum to 60. For category 4, the simulated standard deviation is 1.0, the central 95% interval is 0 to 3, and 19 replications have a count of at least 4.
The observed top-category count exceeds the upper end of the stated interval. Its simulated upper-tail fraction is \(19/1000=0.019\), and its standardized difference from the replicated mean is
This is a notable predictive discrepancy: the fitted model rarely generates as many top-category responses as were observed. The cumulative count through category 3 is \(60-4=56\), whereas its replicated mean is \(60-1.1=58.9\). The same feature therefore appears as a deficit below the top-category threshold. These are two descriptions of the same discrepancy, not two independent pieces of evidence. The check identifies a feature to investigate; it does not establish why the model misses it or prove that a particular alternative is correct.
Assumptions, Diagnostics, and Common Pitfalls
A meaningful comparison depends on a valid setup. Confirm that category labels and ordering are correct, that the observed and replicated data use the same observations and denominator, and that replications were generated from a fitted model that converged and used the intended random-effects structure. Check that the chosen conditional or unconditional replication matches the target. If the data contain unequal numbers of observations per cluster, the replication and frequency calculation must retain those observed cluster sizes when that is part of the target.
Inspect the whole replicated distribution, not only a mean. A frequency can have a skewed or discrete predictive distribution, and adjacent category counts are constrained because they sum to \(n\). If many categories and cutpoints are checked, at least one may look extreme by chance. A simulation tail fraction is a diagnostic summary, not automatically a calibrated frequentist p-value; it does not give the probability that the model is true or that the null hypothesis is true. The estimate also has Monte Carlo error. For a tail fraction \(\hat{r}=r/B\), its approximate Monte Carlo standard error is \(\sqrt{\hat{r}(1-\hat{r})/B}\), so a small number of replications can make an apparent tail probability unstable.
| Approach | What it emphasizes | Main caution |
|---|---|---|
| Replicated category frequencies | Whether each exact ordinal category is reproduced | Very sparse counts are discrete and often skewed |
| Replicated cumulative proportions | Whether response mass falls on the expected side of each threshold | Threshold summaries overlap and are dependent |
| Large-sample chi-square comparison | A single summary of observed and expected category counts | Its approximation can be poor when expected counts are small |
| Combining adjacent categories | A less sparse summary after categories are merged | Merging changes the question and can conceal misfit in the rare category |
The simulation-based checks are especially useful when ordinary large-sample approximations are questionable, but they are not a substitute for a well-specified model. They can flag mismatch without identifying its source, and results may depend on whether predictions are conditional on observed clusters or average over the random-effects distribution. A low tail fraction also does not account automatically for selecting the category to inspect after seeing the data. Follow an unusual pattern by checking model assumptions, coding, cluster structure, and the scientific meaning of the rare response.
Check Your Understanding
Use the definitions and simulation comparisons above to answer these questions.
- For observed counts \((3,12,25)\), what are the cumulative proportions through categories 1 and 2 when \(n=40\)?
- A category has observed count 2, replicated mean 4, and replicated standard deviation 1.5. Calculate its standardized difference.
- Why are cumulative proportions through categories 1 and 2 not independent checks?
- When would unconditional rather than conditional replications be appropriate for an ordinal frequency check?
Solutions. (1) The cumulative counts are \(3\) and \(3+12=15\), so the proportions are \(3/40=0.075\) and \(15/40=0.375\). (2) The standardized difference is \((2-4)/1.5=-1.33\), so the observed count is 1.33 simulated standard deviations below the replicated mean. (3) The count through category 2 includes all observations counted through category 1; the summaries share observations and are mathematically dependent. (4) Use unconditional replications when the target is prediction across clusters in the population, so the replicated data should include new random-effects draws rather than condition on the fitted effects of the observed clusters.