Why repeated counts need a subject-level model
Repeated pharmacodynamic counts from one participant are rarely independent in the same way as counts from different participants. Some people may have persistently higher event rates than others because of stable susceptibility, physiology, or unmeasured characteristics. A model that treats every count as independent can mistake this persistent subject-to-subject variation for unexplained count variability. The key distinction is whether extra variation is shared across a subject’s visits or is specific to an observation even after accounting for the subject.
A random-intercept model represents stable differences with a latent subject effect. A negative-binomial conditional distribution can additionally represent extra variability at a particular observation. These are different model components: repeated observations help reveal the shared component because counts from the same subject tend to move together, whereas conditional overdispersion does not by itself create that cross-visit dependence.
Model specification and assumptions
For a Poisson random-intercept model, write the conditional mean as
Here \(x_{ij}\) might be a concentration or dose measure, and \(\log(t_{ij})\) is an offset when counts accrue over different exposure durations. The Poisson assumption is conditional: given the random intercept and covariates, the variance of \(Y_{ij}\) equals \(\mu_{ij}\). The model also assumes the random effects are drawn from the stated distribution, independent between subjects, and independent of the covariates. Conditional independence across visits is a substantive assumption, not just a computational convenience.
To allow additional observation-level variation, a common negative-binomial parameterization is
The negative-binomial random-intercept model uses this conditional distribution together with the same subject effect. When \(\kappa=0\), it reduces to the conditional Poisson model. When \(\tau^2=0\), there is no subject-level random-intercept variation, although \(\kappa\) may still be positive. The parameter \(\kappa\) describes conditional overdispersion; \(\tau^2\) describes latent differences that persist across a subject’s observations.
Worked Example: Interpreting a Poisson Random-Intercept Fit
Suppose a hypothetical analysis records 24-hour adverse-event counts at four visits for each of 60 participants. Concentration \(x_{ij}\) is measured in mg/L. A fitted Poisson random-intercept model estimates \(\hat{\beta}_1=-0.300\) per mg/L and \(\hat{\tau}^2=0.360\) log-rate units squared. Assume the offset is 24 hours for every observation and the model’s conditional Poisson and random-effect assumptions are suitable for this illustration.
At a fixed subject effect, a 1 mg/L concentration increase changes the conditional expected count by the rate ratio \(\exp(\hat{\beta}_1)=\exp(-0.300)=0.7408\). Thus, under the fitted log-linear model, the conditional expected count over 24 hours is about 25.9% lower for a 1 mg/L increase, holding the subject effect and other covariates fixed.
The estimated standard deviation of the subject intercept is \(\sqrt{0.360}=0.600\) log-rate units. Two subjects whose intercepts differ by one such standard deviation have conditional rates in the ratio \(\exp(0.600)=1.822\), at the same covariate values. This describes the scale of latent subject variation; it does not mean that every pair of participants differs by exactly this ratio.
For this random-intercept log-link model, the fixed-effect rate ratio is also the marginal rate ratio if the random-intercept distribution is unchanged across concentration values and there are no relevant interactions or random slopes. In fact, integrating over \(b_i\) multiplies the mean at each covariate value by the same factor \(\exp(\tau^2/2)\), which cancels in the ratio. This equivalence is specific to these conditions; it should not be generalized automatically to other models.
What the random intercept does to variance and dependence
The distinction between subject heterogeneity and conditional dispersion follows directly from the laws of total expectation, variance, and covariance. Consider first the Poisson random-intercept model with a fixed covariate pattern, and define \(a_{ij}=t_{ij}\exp(\beta_0+\beta_1x_{ij})\). Then the conditional mean is \(a_{ij}\exp(b_i)\). Because \(b_i\sim N(0,\tau^2)\), the lognormal moment identities are \(E[\exp(b_i)]=\exp(\tau^2/2)\) and \(E[\exp(2b_i)]=\exp(2\tau^2)\). Therefore,
and the marginal variance is the expected conditional variance plus the variance of the conditional mean:
where \(m_{ij}=E(Y_{ij})=a_{ij}\exp(\tau^2/2)\). For two distinct visits \(j\) and \(k\) on the same subject, conditional independence makes the conditional covariance zero, but the shared intercept still yields
Thus a positive random-intercept variance creates positive covariance across visits, in addition to increasing each count’s marginal variance. This induced dependence is the important signature of persistent heterogeneity.
Worked Example: Quantifying Heterogeneity in Repeated Counts
Consider hypothetical observations with conditional mean 4 counts per observation when \(b_i=0\), and let \(\tau^2=0.200\). Assume the Poisson random-intercept model is appropriate and that the two visits have the same covariates and exposure. The marginal mean at either visit is
The marginal variance is
The variance exceeds the mean even though the conditional distribution is Poisson. This excess is generated by the shared subject effect, not by a negative-binomial conditional distribution. The covariance between the two distinct visits is
The corresponding correlation is approximately \(4.327/8.747=0.495\), since the visits have equal marginal variance. In real data, this calculation describes an implication of the assumed model; observed correlation alone does not prove that the random-intercept distribution is correct.
Adding conditional negative-binomial dispersion
With conditional negative-binomial variance \(\mu_{ij}+\kappa\mu_{ij}^2\), the same variance decomposition shows how the two sources combine. Let \(m_{ij}=a_{ij}\exp(\tau^2/2)\). The result is
For distinct visits on the same subject, conditional independence still gives
The conditional dispersion parameter \(\kappa\) increases the variance of an observation but does not add cross-visit covariance under the model’s conditional-independence assumption. In contrast, \(\tau^2\) contributes to both marginal variance and within-subject covariance. This distinction is useful, but it does not guarantee that both components can be estimated precisely: with few visits per subject, or little repeated information, different combinations of the parameters may explain the data similarly.
Worked Example: Separating Shared and Observation-Level Variation
Suppose a hypothetical repeated-count data set supports a negative-binomial random-intercept model. At a specified covariate pattern, the conditional mean at \(b_i=0\) is 4 counts, \(\hat{\tau}^2=0.200\), and \(\hat{\kappa}=0.250\). Assume equal exposures and covariates across two visits, conditional independence given \(b_i\), and the normal random-intercept distribution.
The marginal mean is again \(m=4\exp(0.100)=4.420681\) counts. The marginal variance, now including both sources of variation, is
The covariance between the two different visits is unchanged from the random-intercept contribution: \(19.54244\{\exp(0.200)-1\}\approx4.327\text{ counts}^2\). The additional conditional dispersion raises the single-visit variance but does not raise that cross-visit covariance in this model. This pattern explains why repeated observations are informative about subject heterogeneity, while unusually variable counts at individual visits can motivate conditional overdispersion.
Fitting the models and comparing explanations
For each subject, the likelihood contribution must account for the unobserved intercept by integrating the conditional likelihood over its distribution. In the Poisson case, if \(y_i\) denotes all counts for subject \(i\), that contribution has the form
where \(\phi(b;0,\tau^2)\) is the normal density. The negative-binomial version replaces the conditional Poisson probabilities with the chosen negative-binomial probabilities and estimates \(\kappa\) as well. The integral is generally evaluated numerically. Maximum likelihood estimation then selects fixed effects and variance parameters that maximize the product of the subject-level likelihood contributions.
The next example illustrates model comparison using hypothetical fitted likelihoods. The information criterion shown is AIC, calculated as \(-2\ell+2q\), where \(\ell\) is the maximized log likelihood and \(q\) is the number of estimated parameters. A lower AIC indicates a preferable fit-complexity tradeoff among the specified candidates; it does not establish that a model is scientifically correct.
Worked Example: Comparing Heterogeneity and Overdispersion Models
A hypothetical study records three count visits for each of 120 subjects. All candidate models use the same two fixed-effect coefficients, including the concentration effect and an exposure-time offset. The fitted log likelihoods below are illustrative results from fitting the integrated likelihood under each model.
| Model | Parameters \(q\) | Log likelihood \(\ell\) | AIC |
|---|---|---|---|
| Poisson, no random intercept | 2 | -412 | 828 |
| Poisson random intercept | 3 | -365 | 736 |
| Negative binomial, no random intercept | 3 | -383 | 772 |
| Negative-binomial random intercept | 4 | -361 | 730 |
For the negative-binomial random-intercept model, \(\mathrm{AIC}=-2(-361)+2(4)=730\). For the Poisson random-intercept model, \(\mathrm{AIC}=-2(-365)+2(3)=736\). The combined model has the lowest AIC of these candidates, by 6 units relative to the Poisson random-intercept fit. Suppose its estimates are \(\hat{\tau}^2=0.120\) and \(\hat{\kappa}=0.180\). The output supports considering both shared subject variability and conditional overdispersion, but the comparison is not proof that both mechanisms are uniquely identified or that the assumptions hold.
If a random-intercept variance is estimated at or near zero, a conventional likelihood-ratio test that assumes an ordinary interior chi-square reference distribution may not be appropriate: zero is a boundary of the allowed parameter space. Boundary-aware inference or a parametric bootstrap can be considered. Model comparisons should also use the same observations and likelihood convention; information criteria from incompatible likelihood approximations should not be treated as directly comparable.
Diagnostics, limitations, and common mistakes
Repeated observations make it possible to look for patterns inconsistent with the model, although formal residual and predictive procedures require careful specification. Warning signs include persistent subject-specific patterns left unexplained after fitting the random intercept, systematic changes in counts over visit order, and evidence that the conditional variance remains much larger than the fitted distribution allows. A random intercept assumes the same latent shift at every visit; it cannot represent subject-specific concentration slopes or changing within-subject trajectories. Likewise, a normal distribution for \(b_i\), conditional independence, and a chosen negative-binomial variance form are assumptions that need scientific and empirical scrutiny.
- Confusing the two variance components. A high marginal variance does not by itself show that the conditional distribution is negative binomial. Repeated within-subject dependence is evidence relevant to a shared subject effect.
- Assuming the random intercept solves every dependence problem. It induces a particular positive dependence pattern. Serial dependence, changing subject effects, or unmodeled time trends may require a different model.
- Interpreting \(\tau^2\) as a count-scale variance. It is variance on the log-rate scale. Its square root is a standard deviation on that scale, and exponentiating a difference gives a rate multiplier.
- Claiming a fixed rate ratio is always marginal. For this random-intercept log-link model, the ratio agrees marginally only when the random-effect distribution is unchanged across predictor values and there are no relevant interactions or random slopes. Other model structures need not preserve that equivalence.
The practical choice is not always between a Poisson random-intercept model and a negative-binomial random-intercept model. A Poisson model without a random effect, a negative-binomial model without a random effect, or a random-intercept model with conditional Poisson counts may be adequate for particular data. Repeated counts with little within-subject replication may not distinguish the options well. Fit several scientifically plausible specifications, consider uncertainty and convergence, and avoid treating one information criterion or variance estimate as a definitive diagnosis.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In a Poisson random-intercept model, what feature of the data does \(\tau^2\) represent, and what feature does \(\kappa\) represent in the negative-binomial extension?
- For a Poisson random-intercept model with \(\tau^2=0\), what is the covariance between two distinct visits on the same subject under conditional independence?
- At a fixed subject effect, a concentration coefficient is \(-0.20\) per mg/L. What is the conditional rate ratio for a 1 mg/L increase?
- Why can a random intercept produce marginal variance greater than the marginal mean even when each conditional count is Poisson?
- What is a key limitation of using only one count observation per subject to distinguish subject heterogeneity from conditional overdispersion?
Solutions. (1) \(\tau^2\) is the variance of persistent subject effects on the log-rate scale, while \(\kappa\) controls additional conditional variance at an observation. (2) It is zero: with \(\tau^2=0\), there is no shared random intercept, and the specified conditional independence gives zero covariance between distinct visits. (3) The rate ratio is \(\exp(-0.20)=0.8187\), so the conditional expected rate is about 18.1% lower per 1 mg/L increase, holding other terms fixed. (4) Variation in the latent subject effect adds \(\operatorname{Var}\{E(Y_{ij}\mid b_i)\}\) to the expected conditional variance, so the marginal variance exceeds the marginal mean when \(\tau^2>0\). (5) A single observation per subject provides little direct information about within-subject dependence; the two sources of extra variation can be difficult to separate without repeated observations.