Why the Trial Question Matters
In a cluster-randomized trial, groups such as clinics or schools—not individual participants—are assigned to treatment. Participants within a group may have more similar outcomes than participants in different groups. A binary outcome might be whether each participant experienced a specified event by a fixed follow-up time. The treatment comparison then depends not only on the outcome scale, but also on which population quantity the trial is intended to estimate.
A logistic generalized linear mixed model (GLMM) describes treatment effects conditional on a cluster’s random effect. A generalized estimating equation (GEE) specifies a marginal, population-averaged mean model. These approaches can answer related but different questions. Neither coefficient should be called “the treatment effect” without stating its estimand and scale.
Trial Setup and Model Assumptions
Consider a hypothetical trial in which 12 clinics are randomized, six to each arm. Each clinic enrolls 10 participants, and the outcome is an event recorded by the end of follow-up. For illustration, suppose the observed event counts by clinic are as follows.
| Arm | Events in the six clinics (each out of 10) | Total events | Total participants |
|---|---|---|---|
| Control | 3, 4, 5, 2, 6, 7 | 27 | 60 |
| Treatment | 1, 2, 4, 5, 3, 5 | 20 | 60 |
A random-intercept logistic GLMM for these data is
Here \(\operatorname{logit}(p)=\log\{p/(1-p)\}\), \(\beta_A\) is the conditional treatment log odds ratio, and \(\tau^2\) is the between-clinic random-intercept variance. The model assumes that, conditional on \(b_i\) and the predictors, participant outcomes are independent Bernoulli variables with the stated means; the random intercepts follow the specified normal distribution and are independent across randomized clinics. The treatment assignment must be at the clinic level, and the model must account for that assignment and the within-clinic outcome dependence. A causal interpretation of the randomized treatment contrast additionally relies on appropriate trial conduct, outcome measurement, and handling of missing outcomes.
A treatment-only GEE instead specifies a marginal mean such as
The coefficient \(\gamma_A\) is a population-averaged log odds ratio under this mean model. The GEE accounts for within-clinic dependence in estimating uncertainty, but it does not introduce a clinic-specific random intercept with a normal distribution. Its mean model must be appropriate for the marginal probabilities; reliable robust inference also requires enough independent clusters for its large-sample approximation to be credible.
Worked Example: Crude Marginal Risk Difference
Use the observed totals in the hypothetical trial to calculate the arm-specific event risks and their difference, treatment minus control.
The control risk is \(27/60=0.4500\), and the treatment risk is \(20/60=0.3333\). Therefore the observed risk difference is
In this hypothetical sample, the event risk is 11.67 percentage points lower in the treatment arm. This is a descriptive comparison of observed participant risks, not by itself an uncertainty interval or a test of the treatment effect. Because all clinics have the same number of participants, the pooled participant risks also give equal weight to each clinic here. With unequal cluster sizes, the choice between a participant-average and a cluster-average target should be made explicitly.
What the GLMM and GEE Coefficients Mean
For the GLMM, fix a clinic effect at \(b_i=b\). The conditional odds under control are \(\exp(\beta_0+b)\), while the conditional odds under treatment are \(\exp(\beta_0+\beta_A+b)\). Their ratio is \(\exp(\beta_A)\), which does not depend on \(b\) in this random-intercept model. Thus the GLMM treatment coefficient compares participants in clinics with the same value of the latent clinic effect. It is not generally the odds ratio obtained after averaging risks over clinics.
The GEE coefficient \(\gamma_A\), by contrast, compares marginal odds under the two assignments. It concerns the population-averaged mean specified by the GEE. When the mean model contains only treatment, the model expresses a marginal risk for each arm; the resulting odds ratio compares those two marginal risks. It is not a conditional comparison at a fixed clinic effect.
Worked Example: Conditional Treatment Odds Ratio
Suppose, for illustration, a fitted random-intercept logistic GLMM gives \(\hat\beta_0=-0.200\), \(\hat\beta_A=-0.511\), and \(\hat\tau=0.800\). Interpret the treatment coefficient conditionally.
The conditional odds ratio is
At any fixed clinic random intercept, the model estimates treatment odds to be about 0.600 times control odds, or 40.0% lower. This is a conditional odds comparison, not a 40.0% reduction in event risk. For a clinic with \(b=0\), the fitted control risk is \(\operatorname{logit}^{-1}(-0.200)\approx0.450\), and the treatment risk is \(\operatorname{logit}^{-1}(-0.711)\approx0.3294\). The corresponding risk difference at \(b=0\) is about \(-0.1208\). Clinics with other random-intercept values have different risks, although the conditional odds ratio remains the same under this model.
Averaging the GLMM to Address a Population Question
A patient-average risk under assignment \(a\) is obtained by averaging the conditional risk over the random-intercept distribution. For the model above, this is the logistic-normal integral
where \(\phi\) is the standard normal density. In general, the integral is not equal to the conditional risk evaluated at \(b=0\). It is usually evaluated by numerical integration or simulation. The marginal risks can then be compared using a risk difference, risk ratio, or marginal odds ratio, depending on the trial question.
Worked Example: Marginal Risks From the Fitted GLMM
Use the illustrative estimates \(\hat\beta_0=-0.200\), \(\hat\beta_A=-0.511\), and \(\hat\tau=0.800\). Numerical integration over \(b\sim N(0,0.800^2)\) gives the marginal risks below.
The marginal risk difference is
The model therefore estimates an average event risk about 10.77 percentage points lower under treatment for the population represented by the random-intercept distribution. The marginal risk ratio is \(0.3487/0.4564\approx0.764\), or about 0.764. The corresponding marginal odds ratio, computed from the unrounded risks, is
This differs from the conditional odds ratio of 0.600. If the risks are instead coarsely represented as 0.349 and 0.456 for an arithmetic illustration, their odds ratio is
That last digit reflects the coarsely rounded inputs; using the more accurate integrated risks gives approximately 0.638. Reported odds ratios should be calculated from unrounded estimates when available.
Which Trial Question Does Each Estimand Answer?
A conditional GLMM effect is useful when the scientific question concerns treatment comparisons among clinics with the same underlying propensity for the event, represented by the random intercept. A marginal effect is useful when the question concerns average outcomes under each treatment assignment in a target population. Trial reports should identify the target population, outcome scale, and whether the comparison is conditional or marginal.
A treatment-only GEE gives a direct marginal mean-model approach. For the observed totals above, the crude marginal odds ratio is
This is the observed marginal odds contrast, with log odds contrast \(\log(0.611)\approx-0.493\). A GEE targets a marginal contrast of this kind, while its standard error and inferential procedure account for clustering. The crude number is not a substitute for the GEE uncertainty calculation. Nor must a fitted GEE odds ratio exactly equal the odds ratio obtained by integrating a fitted GLMM: the models estimate different quantities and may also differ because of finite-sample variation or mean-model specification.
The difference between conditional and marginal odds ratios is not evidence that one model has necessarily failed. Odds ratios are non-collapsible: even without confounding, averaging risks over heterogeneous baseline propensities can change the odds ratio. This is why the integrated GLMM marginal odds ratio need not equal its conditional odds ratio, and why a GEE treatment coefficient need not equal the GLMM treatment coefficient.
Decide whether the question concerns a treatment contrast at a fixed cluster effect or an average contrast across the target population.
Use a conditional random-effects model for a clinic-specific comparison under its assumptions, or a marginal mean model such as GEE for a population-averaged comparison.
Distinguish odds ratios from risk differences and risk ratios, and state the population and assignment contrast represented by each result.
Diagnostics, Limitations, and Common Pitfalls
Before interpreting estimates, check that treatment was randomized at the cluster level and that the analysis uses the clinic as the independent randomized unit. Examine whether outcome recording and follow-up are comparable between arms, whether the assumed binary outcome is defined consistently, and whether missing outcomes or protocol deviations could affect the target comparison. For a GLMM, assess whether the random-intercept distribution and conditional mean structure are plausible; unusually influential clusters, sparse events, or convergence warnings can make estimates unstable. For GEE, assess whether its marginal mean model is credible and whether the number of independent clusters supports the planned inference. Many participants within only a few clinics do not create many independent randomized units.
A central limitation is that the GLMM marginal risks depend on the assumed random-effects distribution. If that distribution or the conditional mean model is substantially wrong, integrated predictions may not represent the target population well. GEE avoids specifying a distribution for latent clinic effects, but its marginal mean model still requires adequate specification, and finite-sample inference with few clusters can be unreliable. Neither method repairs biased allocation, differential outcome measurement, or informative missingness without additional modeling or design assumptions.
- Pitfall: treating the GLMM coefficient as a population-average effect. The incorrect reasoning is that a randomized trial automatically makes \(\exp(\beta_A)\) the average participant odds ratio. Randomization supports a treatment comparison, but it does not turn a conditional coefficient into a marginal one. Integrate predicted risks over the random-effects distribution, then form the desired marginal contrast.
- Pitfall: calling a risk reduction an odds reduction. An odds ratio of 0.600 means 40% lower odds, not 40% lower risk. Report risks or a risk difference when the question concerns absolute event probabilities.
- Pitfall: interpreting participants as independent randomized units. The clinics were randomized, so clustering must be reflected in estimation and inference. Treating all 120 participants as independent can understate uncertainty.
- Pitfall: choosing a model only because its estimate is familiar. The GLMM and GEE coefficients answer different questions. Choose the estimand first, then select and justify a model that targets it.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- In the random-intercept GLMM, what does \(\exp(\beta_A)\) compare?
- Why can the integrated marginal odds ratio differ from the GLMM conditional odds ratio?
- For the hypothetical trial, calculate the treatment-minus-control observed risk difference.
- Which approach directly specifies a population-averaged mean model: the GLMM or GEE?
- Why is it not adequate to treat all 120 participants as independent randomized units?
Solutions. (1) It compares treatment and control odds at a fixed clinic random-intercept value. (2) Logistic risks are averaged over clinic effects before the marginal odds are formed; the odds ratio is generally changed by this averaging. (3) \(20/60-27/60=0.3333-0.4500=-0.1167\), a difference of \(-11.67\) percentage points. (4) GEE directly specifies a marginal mean model; a GLMM can also produce marginal predictions by integrating its conditional predictions over the random-effects distribution. (5) Treatment was assigned to 12 clinics, not independently to 120 participants, and outcomes within each clinic may be correlated. Ignoring that structure treats dependent observations as independent and can misrepresent uncertainty.