Why a Zero-Random-Effect Prediction Is Not a Population Average
A count model with random effects describes expected counts conditionally: the expected count depends on a subject's random effect as well as on measured covariates and exposure time. A population-averaged expected count instead averages those conditional expectations over the population distribution of random effects. These quantities generally differ, even when the random effects have mean zero. The reason is that a log link transforms random effects exponentially, and averaging an exponential is not the same as exponentiating an average.
This distinction matters when reporting an expected count or rate for a population, comparing groups at the population level, or checking predictions against aggregate data. A prediction at random effect zero describes a subject at the center of the random-effects distribution on the linear-predictor scale; it is not automatically the average response in the population.
This definition uses the law of total expectation: average the conditional mean across the distribution of \(b_i\). It does not require the conditional count distribution to be Poisson. A Poisson model is one common choice for the conditional distribution, but the marginal mean calculation follows whenever the stated conditional mean and random-effects distribution are appropriate.
Normal Random Effects: The Marginal Mean Formula
Suppose \(b_i\sim N(0,\Omega)\), where the vector has mean zero and covariance matrix \(\Omega\). The model's fixed-effects prediction at \(b_i=0\) is \(T_{ij}\exp(x_{ij}^{\mathsf T}\beta)\). To obtain the population average, the random-effects term must be integrated, not set to zero.
The result assumes that the random-effects distribution is normal with the stated covariance matrix, and that the conditional mean has the log-linear form above. The covariates and exposure are held fixed during the integration. If the random-effects mean is not zero, its contribution must also be included in the linear predictor.
Why the Formula Has a Variance Correction
Write \(U=z_{ij}^{\mathsf T}b_i\). Because a linear combination of a multivariate normal vector is normal, \(U\) is normal with mean zero and variance \(v=z_{ij}^{\mathsf T}\Omega z_{ij}\). For \(v>0\), the expectation of \(\exp(U)\) can be derived directly from the normal density. When \(v=0\), \(U=0\) almost surely, so \(E[\exp(U)]=1=\exp(v/2)\).
The second line follows by completing the square: \(u-u^2/(2v)=-(u-v)^2/(2v)+v/2\). The remaining integral is the integral of a normal density centered at \(v\), multiplied by \(\exp(v/2)\), so it equals \(\exp(v/2)\). Multiplying this expectation by the fixed part \(T_{ij}\exp(x_{ij}^{\mathsf T}\beta)\) gives the stated marginal mean.
Since \(v\geq 0\), the factor \(\exp(v/2)\) is at least one. Consequently, for this mean-zero normal random-effects model, the population-averaged mean is at least as large as the prediction at zero random effect, and is strictly larger whenever \(z_{ij}^{\mathsf T}\Omega z_{ij}>0\). This is a mathematical consequence of the log link and the normal distribution, not evidence that every particular subject has a higher expected count than the zero-effect prediction.
Worked Example: A Random-Intercept Marginal Rate
Suppose a hypothetical Poisson count model has exposure \(T=1.5\) hours, a zero-random-effect predicted rate of \(4.000\) counts per hour at a specified concentration, and a normal random intercept \(b_i\sim N(0,0.37)\). The conditional mean count for a subject with random intercept \(b_i\) is \(1.5(4.000)\exp(b_i)\). Find the zero-effect expected count and the population-averaged expected count and rate.
At \(b_i=0\), the expected count is \(1.5\times4.000=6.000\) counts. Averaging over the random intercept multiplies this count by \(\exp(0.37/2)\):
The population-averaged rate is the expected count divided by the exposure: \(7.219/1.5=4.8127\), or 4.813 counts per hour. The rate at zero random effect is \(4.000\) counts per hour. Their difference arises because the population average includes subjects with both positive and negative random intercepts, and exponentiation gives greater weight to positive deviations.
Random Slopes and Covariances
When a model includes a random slope, the variance correction depends on the covariate value. For a random intercept and slope, \(z=(1,x)^{\mathsf T}\), so \(z^{\mathsf T}\Omega z=\operatorname{Var}(b_{0i}+xb_{1i})\). This variance includes the covariance between the random intercept and slope. Omitting that covariance can change the marginal prediction, especially at covariate values far from zero.
Worked Example: A Random Intercept and Random Slope
Consider a hypothetical rate model with fixed-effects prediction \(\exp(x^{\mathsf T}\beta)=2.000(1.500)^x\) counts per hour at zero random effects. Let \(x=2\) be a dose-level covariate, and suppose the random intercept and slope have covariance matrix \(\Omega=\begin{pmatrix}0.16&0.03\\0.03&0.09\end{pmatrix}\). Calculate the rate at zero random effects and the population-averaged rate. For an interval of \(0.5\) hours, also calculate the corresponding expected counts.
At zero random effects, the rate is \(2.000(1.500)^2=4.500\) counts per hour. Here \(z=(1,2)^{\mathsf T}\), so the variance of the random contribution is
The population-averaged rate is therefore \(4.500\exp(0.640/2)=4.500\exp(0.320)=4.500(1.377128\ldots)=6.197\) counts per hour. For \(T=0.5\) hours, the zero-effect expected count is \(0.5(4.500)=2.250\) counts; the population-averaged expected count is \(0.5(6.197)=3.099\) counts. The covariance term contributes \(0.120\) to the variance; setting it to zero would not reproduce the specified model's marginal prediction.
With random slopes, marginal and conditional covariate effects need not have the same interpretation. The variance correction can change with \(x\), so the population-averaged rate ratio for a change in \(x\) may differ from the conditional rate ratio implied by the fixed slope. This is one reason to calculate marginal predictions at the actual covariate values of interest rather than applying a single correction to all predictions.
When the Random-Effects Distribution Is Not Normal
The integral definition of the population average applies to any specified random-effects distribution. The closed-form variance correction above is specific to normal random effects. For another distribution, use its expectation directly, or approximate the integral numerically. In particular, a mean-zero random effect alone does not determine \(E[\exp(b_i)]\); its full distribution matters.
Worked Example: Integrating a Discrete Random-Effects Distribution
Suppose a hypothetical population has random intercept \(b_i=-0.5\) with probability \(0.8\), and \(b_i=2.0\) with probability \(0.2\). This distribution has mean zero because \(0.8(-0.5)+0.2(2.0)=0\). At the covariate value of interest, the zero-effect rate is \(5.000\) counts per hour. Find the population-averaged rate and the expected count over two hours.
The conditional rates for the two groups of random effects are \(5.000\exp(-0.5)\) and \(5.000\exp(2.0)\) counts per hour. Weighting these rates by their population probabilities gives
Over two hours, the population-averaged expected count is \(2(9.815)=19.630\) counts, compared with \(2(5.000)=10.000\) counts at zero random effect. The distribution is mean zero but not normal, so the normal variance-correction formula should not be assumed. The direct weighted integral gives the result for this specified distribution.
Calculation, Interpretation, and Diagnostics
A population-averaged prediction is defined relative to a target population distribution of random effects. In a fitted model, that distribution is represented by the estimated random-effects parameters. A subject-specific prediction using an estimated random effect instead answers a different question: it predicts conditionally for that subject, given their observed data. Averaging a collection of such subject-specific estimates is not necessarily the same as integrating over the model's population distribution.
For a normal random-effects model, use the following calculation sequence. It keeps the exposure offset, fixed-effects prediction, and variance correction distinct.
Fix the covariates and exposure time at the values for which a population prediction is needed.
Evaluate \(v=z^{\mathsf T}\Omega z\), including covariance terms and the chosen covariate values.
Multiply the zero-effect expected count by \(\exp(v/2)\), or multiply the zero-effect rate by the same factor to obtain a marginal rate.
Counts retain the stated interval's exposure; divide by exposure only when reporting a rate per unit time.
Diagnostics should address both the conditional count model and the assumed random-effects distribution. Examine predictive performance across subjects and covariate ranges, including whether the model reproduces observed aggregate counts or rates at relevant exposure times. Check whether estimated random-effect variances are plausible and whether predictions are sensitive to the assumed distribution, especially when the data are sparse or there are few subjects. Simulation-based checks can compare replicated population summaries with observed summaries. A good conditional fit does not by itself guarantee that the assumed random-effects distribution yields reliable population averages.
A practical alternative to the normal closed form is numerical integration, such as quadrature or Monte Carlo averaging, when the random-effects structure or distribution makes an analytic expectation unavailable. A prediction at \(b_i=0\) is simpler but answers a conditional, not population-averaged, question. The two approaches should not be treated as interchangeable. The marginal mean also does not by itself specify the full marginal count distribution: integrating a conditional Poisson model over random effects generally produces a mixture distribution, not a Poisson distribution with the marginal mean.
Common Mistake and Limitations
Wrong reasoning: “The random effects have mean zero, so averaging over them leaves the prediction unchanged.” This incorrectly applies the identity for averaging a linear function to an exponential function. In general, \(E[\exp(b_i)]\neq\exp(E[b_i])\). For normal \(b_i\sim N(0,\sigma_b^2)\), the correct expectation is \(\exp(\sigma_b^2/2)\), which exceeds one when \(\sigma_b^2>0\).
The normal formula is only as credible as its assumptions. It can be inaccurate if the random-effects distribution is poorly represented, and a nonlinear random-effects structure may require numerical integration. Estimated marginal means also carry uncertainty from the fixed effects and covariance parameters; the plug-in calculation alone is a point prediction, not an interval. Finally, the population average is specific to the covariates and exposure used in the calculation. It should not be presented as a universal rate for populations with different covariate distributions.
Check Your Understanding
Answer each question, then compare with the solutions below.
- A model has random intercept \(b_i\sim N(0,0.20)\) and zero-effect rate \(3.000\) counts per hour. What is the population-averaged rate?
- For a random intercept and slope, why must the intercept-slope covariance be included when calculating the marginal mean?
- If a random effect has mean zero but is not normal, is its mean sufficient to calculate the marginal rate? Explain.
- What does a prediction at \(b_i=0\) describe, and how does that differ from a population-averaged prediction?
Solutions. (1) The variance correction is \(\exp(0.20/2)=\exp(0.10)=1.10517\), so the population-averaged rate is \(3.000(1.10517)=3.31551\), which rounds to 3.316 counts per hour. (2) The random contribution is \(b_{0i}+xb_{1i}\), whose variance includes \(2x\operatorname{Cov}(b_{0i},b_{1i})\); omitting it changes \(z^{\mathsf T}\Omega z\) and therefore the correction. (3) No. The expectation \(E[\exp(b_i)]\) depends on the distribution of \(b_i\), not only on its mean. (4) The zero-effect prediction is conditional on a subject whose random effect is zero on the linear-predictor scale. The population average integrates conditional means across the random-effects distribution.