Two Questions Behind a GLMM Mean
A GLMM can describe a mean for a particular cluster, or a mean for a population of clusters. These are different targets. For the first, the random effect is held at a specified value; for the second, it is averaged over a distribution of random effects. A further choice is whether to hold covariates at specified values or average over their distribution in a target population.
The distinction matters because a statement such as “the mean response at \(x=1\)” does not say whether it refers to a cluster with a particular latent effect, an average across clusters, or a population in which covariate values vary. Before interpreting a fitted GLMM or comparing groups, specify which mean is intended. An estimand is the precise quantity a study seeks to describe; it is not the same thing as the numerical estimate used to approximate it.
What Is Held Fixed, and What Is Averaged?
In a GLMM, a conditional response mean is usually linked to a linear predictor involving fixed effects and random effects. For example, a random-intercept logistic model may be written as
Here the conditional mean is a function of both the covariate value \(x_{ij}\) and the cluster effect \(b_i\). At fixed \(x_{ij}\), changing \(b_i\) changes the cluster-specific mean. The conditional estimand must therefore state the covariate values and the random-effect value, or the cluster to which that value refers. Setting \(b_i=0\) defines the mean for a cluster at the random-effect reference value; it does not, by itself, define the population average.
For a population-averaged mean at fixed \(x\), the covariate value remains fixed while the random effects vary according to their population distribution. If the estimand is intended to describe a target population with varying covariates, it must also specify how those covariates are distributed or weighted. These choices are not interchangeable. Averaging over clusters is not the same as averaging over observations if cluster sizes differ, and averaging over a study’s observed covariates need not represent a different target population.
Worked Examples
Worked Example: A Conditional Logistic Mean and Contrast
Suppose a hypothetical binary-outcome GLMM has \(\operatorname{logit}\{\mu_{ij}(b_i,x_{ij})\}=-1+0.8x_{ij}+b_i\), where \(x\) is a treatment indicator and \(b_i\) is a cluster random intercept. Find the conditional response probabilities for a cluster with \(b_i=0\) under each treatment condition, and interpret the contrast.
For a binary outcome, the inverse-logit function is \(\operatorname{expit}(z)=1/(1+\exp(-z))\). At \(x=0\) and \(b_i=0\), the linear predictor is \(-1+0.8(0)+0=-1\), so \(\mu_{ij}=\operatorname{expit}(-1)=1/(1+\exp(1))\approx0.2689\).
At \(x=1\) and the same random-effect value, the predictor is \(-1+0.8(1)+0=-0.2\), so \(\mu_{ij}=\operatorname{expit}(-0.2)=1/(1+\exp(0.2))\approx0.4502\). The conditional probability difference is \(0.4502-0.2689=0.1812\), or about 18.12 percentage points.
The coefficient contrast on the log-odds scale is \(0.8\), and the corresponding conditional odds ratio is \(\exp(0.8)\approx2.226\). These are conditional interpretations: they compare treatment values for a cluster held at \(b_i=0\). They are not automatically the probability difference or odds ratio averaged over all clusters. The example defines an estimand; by itself it does not establish a causal treatment effect.
Worked Example: Averaging Random Effects Is Not Plugging In Their Mean
Consider the same hypothetical logistic mean with \(x=0\), but suppose, for illustration, that the random intercept has a two-point population distribution: \(b_i=-0.5\) or \(b_i=0.5\), each with probability \(0.5\). Calculate the population-averaged probability at \(x=0\), and compare it with the conditional probability at the mean random effect.
At \(b_i=-0.5\), the predictor is \(-1-0.5=-1.5\), giving \(\operatorname{expit}(-1.5)\approx0.1824\). At \(b_i=0.5\), the predictor is \(-1+0.5=-0.5\), giving \(\operatorname{expit}(-0.5)\approx0.3775\). The population-averaged probability is therefore \(0.5(0.1824255)+0.5(0.3775407)=0.2799831\), or \(0.2800\) to four decimal places.
The random-effect distribution has mean \(0.5(-0.5)+0.5(0.5)=0\). Plugging that mean into the conditional model instead gives \(\operatorname{expit}(-1)\approx0.2689\), not \(0.2800\). Thus the conditional mean at the mean random effect and the average of conditional means over random effects are distinct estimands here. The two-point distribution is an illustrative specification, not an assertion that every GLMM uses that distribution.
Worked Example: Adding a Covariate-Standardized Target
Suppose a hypothetical Gaussian-response GLMM has conditional mean \(\mu_{ij}(b_i,x_{ij})=10+2x_{ij}+b_i\), where the response is measured in hours. The target population has two equally weighted covariate profiles, \(x=0\) and \(x=2\), and the random intercept has population mean zero. Find (a) the average across those covariate profiles for a cluster with \(b_i=1\), and (b) the mean standardized over both profiles and the random-effect distribution.
For the specified cluster, at \(x=0\) the conditional mean is \(10+2(0)+1=11\) hours; at \(x=2\) it is \(10+2(2)+1=15\) hours. Giving each profile weight \(0.5\), the covariate-standardized mean for this cluster is \(0.5(11)+0.5(15)=13\) hours.
For the population-averaged target, average over random effects as well. Since the conditional mean is linear in \(b_i\), averaging \(b_i\) replaces it by its mean, zero. The means at \(x=0\) and \(x=2\) are then 10 and 14 hours, respectively, so the standardized population mean is \(0.5(10)+0.5(14)=12\) hours. The first answer is conditional on a cluster with \(b_i=1\); the second averages over the stated random-effect distribution and the stated covariate profile weights. Both are means in hours, but they describe different targets.
A Precise Specification and Its Assumptions
A useful way to define an estimand is to write down the conditioning and averaging operations explicitly. Let \(F_b\) be the population distribution of random effects. For fixed covariates \(x\), the population-averaged response mean is
If the target population has covariate distribution \(F_X\), a covariate-standardized population mean is
This notation makes clear what the target averages over. The random-effect distribution represents variation among clusters under the model; \(F_X\) represents covariate profiles in the chosen target population. They are separate ingredients. If the intended target uses a joint distribution in which covariates and random effects are associated, the relevant averaging distribution is joint, rather than an assumption that the two can be averaged independently.
These definitions rely on a meaningful conditional mean model and a specified random-effect distribution. Interpretation also requires the target covariate values and weights to be defined: for example, a covariate distribution among people, among clusters, or among observations may produce different targets. In applications, the GLMM’s conditional response distribution and random-effect structure must be adequate for the scientific purpose. If the random-effect distribution is misspecified, the resulting population average can be misspecified even when a conditional coefficient appears plausible.
The equations are definitions of the target, not a recipe for how to estimate it. Estimation requires fitted model parameters and, where relevant, an estimate of the random-effect distribution and the target covariate distribution. A conditional prediction using an estimated cluster effect is also not identical in meaning to the conditional mean at a known latent effect: the estimate is uncertain and generally based on that cluster’s observed data.
Why the Distinction Matters
Conditional and population-averaged estimands answer different scientific questions. A cluster-specific estimand may be appropriate when the question concerns expected responses within clusters having specified latent characteristics. A population-averaged estimand is more directly about the mean response across a population of clusters, possibly standardized to a specified covariate mix. Neither is universally preferable; the appropriate one depends on the question and target population.
A GLM without random effects, a GLMM conditional interpretation, and a population-averaged approach such as GEE should not be treated as interchangeable labels for the same target. In particular, a model’s fixed-effect coefficient is part of its conditional linear predictor, and does not by itself state a response-scale population-average contrast. The earlier material on GLM provides background on links and linear predictors; here the essential question is what is conditioned on and what population is being averaged over.
Unequal cluster sizes can also affect the target. Giving every cluster equal weight describes an average cluster; giving every observation equal weight gives more influence to larger clusters. If cluster size is related to outcomes or covariates, these targets may differ substantially. State the unit of averaging rather than relying on the phrase “overall mean.”
Diagnostics and Common Pitfalls
- Plugging in \(b_i=0\) and calling the result population-averaged. This gives the conditional mean at the random-effect reference value. It equals a random-effect average only under special circumstances, not by definition.
- Leaving covariate weights unstated. A mean standardized to the study sample’s covariate mix may not describe a target population with a different mix. Report the profiles and weights used.
- Confusing a conditional coefficient with an averaged response effect. A coefficient in the linear predictor describes the model’s conditional scale. Name the scale and conditioning before interpreting it.
- Ignoring the averaging unit. Equal weighting of clusters and equal weighting of observations answer different questions when cluster sizes vary.
- Using implausible or unsupported covariate profiles. Standardization depends on the model predictions at those profiles. Check that the target profiles are represented sufficiently in the data and that model predictions are credible there.
A practical diagnostic is to write the estimand in words and symbols before computing it: name the response scale, covariate values or distribution, random-effect distribution, and weighting unit. If these cannot be stated clearly, the analysis has not yet identified a unique mean. Sensitivity analyses using defensible alternative random-effect or target covariate distributions can reveal whether conclusions depend strongly on those choices.
Check Your Understanding
Answer each question, then compare with the solutions below.
- In a random-intercept GLMM, what does the conditional mean at \(b_i=0\) describe, and why is it not automatically a population average?
- A study averages predictions over its observed covariates, giving each observation equal weight. What target does this define, and how might it differ from equal weighting of clusters?
- A model has conditional mean \(\mu(b,x)=5+x+b\), with \(E(b)=0\). Find the population-averaged mean at \(x=3\).
- What additional specification is needed to define a covariate-standardized population mean beyond the GLMM and random-effect distribution?
Solutions. (1) It describes the conditional mean for a cluster at the random-effect reference value, with covariates fixed as stated. A population average requires averaging over the random-effect distribution; the reference value alone does not do that. (2) It defines a mean standardized to the observed observation-level covariate mix. Equal cluster weighting instead gives each cluster the same weight, so large clusters contribute less relative weight than under observation weighting. (3) Averaging over \(b\) gives \(E_b(5+3+b)=8+E(b)=8\). (4) Specify the target covariate distribution or profiles and their weights, including whether the averaging unit is clusters or observations.