Tutorials › Generalized Linear Mixed Models (GLMM) › Estimand-First Choice Between GLMM And GEE

GLMM Versus GEE · Tutorial 148 of 698

Estimand-First Choice Between GLMM And GEE

Start with the quantity the study must estimate, then choose the GLMM or GEE whose mean model directly represents that target.

Intermediate 11 min read

What You'll Learn

  • Define a conditional or population-averaged estimand before selecting a model.
  • Match the estimand’s scale and interpretation to a GLMM or GEE mean model.
  • Recognize when a GLMM coefficient is not the corresponding population-average effect.
  • Identify when marginalizing a GLMM can estimate a population-level target.
  • Compare GLMM and GEE assumptions, inference, and limitations.
  • Apply a decision sequence to binary and continuous repeated outcomes.

Begin With the Quantity the Study Needs

A repeated-measures analysis can be technically well fitted and still answer the wrong scientific question. The key decision is not simply whether outcomes are correlated or whether predictions are needed. First state the estimand: the precise population quantity the analysis is intended to estimate. Then decide whether that quantity is conditional on latent cluster characteristics or averaged over the target population.

For example, a study might ask how treatment changes the odds of an outcome for a unit in a cluster with a specified random effect. That is a conditional target. Alternatively, it might ask how treatment changes the outcome probability for a randomly selected member of the population, averaging over clusters. That is a marginal target. With nonlinear links, these quantities generally differ, even when they refer to the same treatment and outcome.

Definition: An estimand is the precisely defined population quantity an analysis aims to estimate, including the outcome, target population, comparison, and scale. A conditional estimand describes an outcome distribution conditional on random effects or other specified cluster characteristics. A marginal estimand describes an outcome distribution averaged over the random-effects distribution or target population of clusters.

Use \(i=1,\ldots,m\) for clusters and \(j=1,\ldots,n_i\) for units within cluster \(i\). Write \(Y_{ij}\) for the outcome, \(x_{ij}\) for the covariates in the mean model, and \(b_i\) for cluster-level random effects. These indices make the distinction explicit: a GLMM models a conditional mean given \(b_i\), whereas GEE specifies a marginal mean for \(Y_{ij}\).

The Mean Model Determines the Interpretation

A GLMM specifies a conditional distribution for outcomes given the random effects. In a common formulation, the conditional mean \(\mu_{ij}(b_i)=E(Y_{ij}\mid b_i,x_{ij})\) satisfies

$$ g\{\mu_{ij}(b_i)\}=x_{ij}^{T}\beta+z_{ij}^{T}b_i, \qquad b_i\sim F_b. $$

Here \(g\) is the link function, \(z_{ij}\) describes how random effects enter, and \(F_b\) is their assumed distribution, often a mean-zero normal distribution. A coefficient in \(\beta\) describes a change in the conditional linear predictor, holding the random effects fixed. For a logistic model, exponentiating a treatment coefficient gives a conditional odds ratio, not automatically an odds ratio averaged over clusters.

GEE instead specifies the marginal mean \(E(Y_{ij}\mid x_{ij})\), commonly through

$$ g\{E(Y_{ij}\mid x_{ij})\}=x_{ij}^{T}\beta_{\mathrm{GEE}}. $$

GEE also uses a working covariance structure to account for within-cluster dependence in estimation. The working correlation affects efficiency and estimated uncertainty; it does not turn the mean coefficient into a conditional random-effects coefficient. As in the earlier material on GEE, robust standard errors support inference when the working correlation is imperfect, provided the marginal mean is correctly specified and there are sufficiently many independent clusters.

The two formulations can agree for some targets. For example, with an identity link and a random intercept whose mean is zero, the marginal mean is \(x_{ij}^{T}\beta\) when the conditional mean is \(x_{ij}^{T}\beta+b_i\). Thus the fixed-effect mean difference has the same value conditionally and marginally. Under nonlinear links, averaging and applying the inverse link generally do not commute:

$$ E_{b_i}\left[g^{-1}(x_{ij}^{T}\beta+z_{ij}^{T}b_i)\right] \ne g^{-1}(x_{ij}^{T}\beta). $$

This is why a logistic GLMM coefficient and a logistic GEE coefficient need not estimate the same odds ratio. The distinction is about the estimand, not just a choice of standard-error calculation.

A Decision Sequence

1
Write the target in words and on a scale.
Specify the outcome, target population, comparison, and whether the quantity is a mean difference, risk difference, odds ratio, rate ratio, or another measure.
2
Decide what is being averaged over.
If the target holds cluster effects fixed or concerns cluster-specific variation, it is conditional. If it averages over the population of clusters or units, it is marginal.
3
Select a mean model compatible with that target.
A GLMM directly models conditional means. GEE directly models marginal means. A GLMM can also produce a marginal target by integration, but that requires its random-effects assumptions and a defined averaging population.
4
Check assumptions and the study design.
Assess whether the conditional or marginal mean model is credible, whether clusters are independent, and whether there are enough clusters for the intended inference. For GLMMs, also assess the random-effects distribution and conditional outcome model.
5
Report the estimate in the estimand’s language.
State whether the result is conditional or population-averaged, give the scale and units, and avoid treating a fitted association as a causal effect without a design and assumptions that justify that interpretation.

Worked Example: A Population-Average Treatment Effect on Binary Risk

Hypothetical data and target. Suppose 240 patients are enrolled in 12 clinics, with 120 assigned to each of two treatments. The scientific target is the difference in outcome probabilities for patients in the study population, averaging over clinics. A logistic random-intercept GLMM is fitted and gives a treatment coefficient of \(0.80\), an intercept of \(-1.00\), and a random-intercept standard deviation of \(0.80\). These are hypothetical fitted values, used here to compare interpretations.

The conditional treatment odds ratio is

$$ \exp(0.80)=2.226. $$

This says that, at a fixed clinic random intercept, the treatment odds are estimated to be 2.226 times the comparison-treatment odds. It is not the requested population-average risk difference.

To estimate the population probabilities from this GLMM, average the inverse-logit conditional probabilities over \(b_i\sim N(0,0.80^2)\). Using five-point Gaussian quadrature for this illustration, the standard-normal nodes are \(0,\pm1.3556,\pm2.8570\), with weights \(0.53333\), \(0.22208\) for each of the first pair, and \(0.01126\) for each of the second pair. The random-effect values are \(0,\pm1.0845,\pm2.2856\). For the comparison treatment, the conditional linear predictor is \(-1+b_i\), so the approximate marginal probability is

$$ \begin{aligned} \hat p_0 &\approx 0.53333\,\operatorname{logit}^{-1}(-1) +0.22208\{\operatorname{logit}^{-1}(-2.0845)+\operatorname{logit}^{-1}(0.0845)\}\\ &\quad+0.01126\{\operatorname{logit}^{-1}(-3.2856)+\operatorname{logit}^{-1}(1.2856)\}\\ &\approx 0.2930. \end{aligned} $$

For the treatment group, add \(0.80\) to each linear predictor. The same weighted calculation gives \(\hat p_1\approx0.4563\). Thus the estimated population-average risk difference is

$$ \hat p_1-\hat p_0=0.4563-0.2930=0.1633. $$

On these hypothetical fitted values, the estimated population-average outcome probability is about 16.3 percentage points higher under treatment. The calculation uses the assumed normal random-intercept distribution; it is not the same estimand as the conditional odds ratio. A GEE with a correctly specified marginal mean could target the population-level comparison directly, without requiring this random-effects integration.

The GLMM calculation assumes the conditional logistic mean and normal random-intercept distribution are adequate, and that the target averaging distribution is the one represented by the fitted model. The 12-clinic design is also a warning: inference may be fragile with so few independent clusters. The numerical calculation alone does not establish that either model or its uncertainty estimate is adequate.

Worked Choices for Different Scientific Targets

Worked Example: A Conditional Clinic-Specific Odds Ratio

Hypothetical data and target. Consider 30 clinics, each enrolling 20 patients, for 600 patients total. The outcome is whether a patient experiences a binary event. The scientific question is whether treatment changes the event odds for patients in the same clinic, conditional on the clinic’s latent baseline propensity. A logistic random-intercept GLMM gives a treatment coefficient of \(-0.50\).

The model is \( \operatorname{logit}\{P(Y_{ij}=1\mid b_i,x_{ij})\}=\beta_0+\beta_1x_{ij}+b_i \), with \(b_i\sim N(0,\sigma_b^2)\). The conditional odds ratio is

$$ \exp(\hat\beta_1)=\exp(-0.50)=0.6065. $$

Under this fitted model, holding the clinic random intercept fixed, the treatment odds are estimated to be about 0.607 times the comparison odds, or about 39.3% lower. This is compatible with the stated conditional target, so a GLMM is a direct choice. The interpretation depends on the conditional mean model and the random-effects specification being adequate. It does not by itself imply that treatment causes a reduction in odds; causal interpretation would require an appropriate design and causal assumptions.

If the actual question instead concerned the event probability for a randomly selected patient across the clinic population, this coefficient alone would not answer it. One would need a marginal analysis such as GEE, or calculate the GLMM-implied marginal probability contrast by integrating and averaging over the target population.

Worked Example: A Population-Average Difference in a Continuous Outcome

Hypothetical data and target. Suppose 25 clinics contribute 400 patients. The outcome is a continuous recovery time measured in days, and the target is the population-average difference in mean recovery time between treatments. Assume a linear mixed model with an identity link, a random clinic intercept \(b_i\) with mean zero, and a common treatment difference. A fitted treatment coefficient is \(-2.40\) days.

The conditional model is \(E(Y_{ij}\mid b_i,x_{ij})=\beta_0+\beta_1x_{ij}+b_i\). Averaging over random intercepts gives

$$ E(Y_{ij}\mid x_{ij}) =\beta_0+\beta_1x_{ij}+E(b_i) =\beta_0+\beta_1x_{ij}, \qquad E(b_i)=0. $$

Therefore the conditional and marginal mean differences both equal \(\beta_1\) under these assumptions. Substituting the fitted coefficient gives an estimated difference of \(-2.40\) days: the treatment group’s mean recovery time is estimated to be 2.40 days shorter. Here either a GLMM or a GEE could target the same mean difference. A GLMM may be useful if the cluster variation itself is of interest; GEE is a direct marginal-mean approach. The model assumptions still matter: in particular, the identity-link mean structure and the zero-mean random intercept must be appropriate, and cluster-level dependence must be handled for valid uncertainty estimates.

Assumptions, Diagnostics, and Limits

An estimand-first choice does not remove the need to evaluate the model. For a GLMM, the conditional outcome distribution, link, fixed-effect mean structure, random-effects structure, and random-effects distribution are assumptions. A misspecified random-effects distribution can matter especially when the goal is to integrate conditional predictions into a marginal target. For GEE, the marginal mean specification is central to the target; the working correlation can be misspecified without necessarily invalidating robust inference, but robust inference relies on independent clusters and enough of them.

  • Check the target against the reported coefficient. A conditional log-odds coefficient should not be presented as a population-average odds ratio. Verify the link, conditioning set, and averaging step.
  • Inspect fit at the relevant level. For a GLMM, assess whether the conditional mean and random-effects structure are plausible. For GEE, assess the marginal mean and whether the working correlation and standard errors are reasonable for the cluster design.
  • Respect the number of clusters. A large number of individual observations does not compensate fully for very few independent clusters. GEE sandwich standard errors may be unreliable with few clusters, and GLMM inference can also be sensitive to limited cluster information.
  • Define the population being averaged over. A marginal estimate depends on the distribution of covariates and clusters over which it is averaged. Changing that target population can change the estimate.

The main alternative to a direct model for the estimand is to fit a model for a different target and transform its output. Marginalizing a GLMM can be useful when conditional structure is scientifically important, but the result inherits the GLMM’s distributional assumptions and requires an explicit averaging distribution. Conversely, fitting GEE does not generally identify cluster-specific random effects or conditional coefficients. Neither method is universally preferable: the choice depends on the target and the assumptions one can defend.

Common Mistake: Choosing by Familiarity Before Defining the Target

A common error is to say, “The data are clustered, so use a GLMM,” or “The study concerns a population, so use GEE,” without specifying the target quantity. Clustering alone does not distinguish conditional from marginal questions, and either method can be used in situations where its model supports the scientific target.

Correction: Write the estimand first. If it is conditional, a GLMM directly represents it. If it is marginal, GEE directly represents it, while a GLMM can provide it only after appropriate integration and averaging. Then evaluate whether the model assumptions, design, and available cluster information support the chosen analysis.

Check Your Understanding

For each item, identify the target and a compatible analysis. Full solutions follow the questions.

  1. A study wants the treatment odds ratio at a fixed clinic random intercept. Which mean model is a direct choice, and what does its treatment coefficient represent?
  2. A study targets the average event probability difference across patients in a clinic population. Why is a logistic GLMM treatment coefficient alone insufficient?
  3. In a continuous-outcome random-intercept model with identity link and mean-zero random intercept, the treatment coefficient is \(-1.7\) hours. What is the corresponding marginal mean difference under the model?
  4. Why does a robust GEE standard error not make a misspecified marginal mean model harmless?

Solutions. (1) A logistic GLMM is direct. Exponentiating its treatment coefficient gives the conditional odds ratio, holding the clinic random intercept fixed. (2) The coefficient describes a conditional log-odds contrast, not the desired marginal risk difference. Use GEE with an appropriate marginal mean or integrate the GLMM-implied probabilities over the specified random-effects and target-population distributions. (3) Averaging the model over \(b_i\) leaves the treatment contrast unchanged because \(E(b_i)=0\) and the link is identity. The marginal mean difference is therefore \(-1.7\) hours. (4) Robust GEE variance estimation addresses uncertainty under working-correlation misspecification; it does not correct a wrong marginal mean. If that mean is wrong, the fitted estimating equations need not target the intended population quantity.

Clinical Biostats