Why Compare Both Models?
Suppose a hypothetical study follows people at several visits and records whether each person experienced a binary outcome. The same treatment indicator can appear in both a generalized linear mixed model (GLMM) and a generalized estimating equation (GEE) analysis. Yet the treatment coefficients do not generally estimate the same quantity: a logistic GLMM coefficient describes a treatment contrast conditional on a subject’s random effect, whereas a logistic GEE coefficient describes a contrast in the population-averaged mean.
This difference is not a contradiction or a disagreement about the data. It follows from the nonlinear logit link: averaging probabilities over subjects’ latent propensities does not usually preserve a logistic model with the same coefficient. The earlier material on conditional and marginal estimands, subject-specific and population-averaged models, and averaging logistic random-intercept models establishes that distinction. Here the goal is to work through a complete hypothetical comparison for repeated binary observations.
Models and Assumptions for the Comparison
Let \(Y_{ij}\) be the binary outcome for subject \(i\) at visit \(j\), where 1 denotes that the event occurred and 0 denotes that it did not. Let \(A_i=1\) indicate treatment and \(A_i=0\) indicate control, and let \(t_{ij}\) denote visit time. The same subjects contribute repeated outcomes. For clarity, suppose the models include treatment and visit as predictors and no treatment-by-visit interaction; thus, each model represents a constant treatment contrast on its own log-odds scale.
For the GLMM, assume a correctly specified conditional mean model, a normally distributed random intercept \(b_i\sim N(0,\sigma_b^2)\), and conditional independence of outcomes within a subject given \(b_i\) and the covariates. Also assume subjects are independent of one another. In this model, the treatment coefficient is a conditional log odds ratio: it compares treatment with control for subjects having the same value of \(b_i\) and visit time.
For the GEE, assume the specified marginal mean model is appropriate and that subjects are independent sampling units. A working within-subject dependence structure is used for estimation; if the mean model is correct and there are enough independent subjects for the large-sample approximation, robust standard errors can support inference even when that working structure is imperfect. The GEE treatment coefficient describes the population-averaged log odds contrast at a given visit under this model.
These are not interchangeable definitions of one coefficient. The GLMM conditions on \(b_i\); the GEE averages over subject-level heterogeneity in its mean. Both coefficients are conditional on the included covariates in their respective model, but only the GLMM coefficient is conditional on the latent random intercept. Neither model, by itself, guarantees a causal treatment effect: that interpretation also requires an appropriate study design and control of confounding.
Worked Example: Comparing Fitted Treatment Odds Ratios
Consider hypothetical software output from the two models, fitted to the same repeated binary outcomes. Assume the model specifications above are suitable, subjects are independent, and the reported standard errors are appropriate for their respective analyses. Suppose the GLMM gives \(\hat{\beta}_A=0.80\) with \(SE=0.25\), while the GEE gives \(\hat{\gamma}_A=0.55\) with \(SE=0.20\). These are stipulated hypothetical fitted results, not estimates from a real study.
GLMM estimate. Exponentiating the conditional coefficient gives the subject-specific odds ratio:
At the same visit and the same random-intercept value, the fitted outcome odds under treatment are about 2.23 times the fitted odds under control. A Wald 95% confidence interval on the coefficient scale is \(0.80\pm1.96(0.25)=(0.310,1.290)\). Exponentiating both endpoints gives an approximate 95% confidence interval for the conditional odds ratio of \((\exp(0.310),\exp(1.290))=(1.363,3.633)\). It excludes 1.
The Wald statistic is \(z=0.80/0.25=3.20\), giving a two-sided p-value of approximately 0.0014 under the standard normal reference distribution. Under the model and its inferential approximation, this is evidence against a zero conditional treatment coefficient.
GEE estimate. Its population-averaged odds ratio is \(\exp(\hat{\gamma}_A)=\exp(0.55)=1.733\). The corresponding coefficient-scale interval is \(0.55\pm1.96(0.20)=(0.158,0.942)\), so the odds-ratio interval is \((\exp(0.158),\exp(0.942))=(1.171,2.565)\). The Wald statistic is \(0.55/0.20=2.75\), with a two-sided p-value of about 0.0060.
In this hypothetical comparison, both fitted intervals exclude an odds ratio of 1, but their point estimates answer different questions. The GLMM estimate is conditional on the latent subject effect; the GEE estimate is population-averaged. Their numerical difference is not evidence that one model must be wrong, and the larger GLMM estimate is not a universal rule for every data set or specification.
Why Averaging Changes the Odds Ratio
The distinction can be seen directly from the GLMM. At treatment value \(a\) and visit \(t\), its marginal probability averages the conditional probability over the random-intercept distribution. In general, the logit of that average is not the average of the conditional logits. Consequently, a constant conditional treatment odds ratio need not equal the odds ratio formed from the averaged probabilities.
A short justification follows from the model equations. Conditional on \(b\), the treatment contrast in log odds is \(\beta_A\), so the conditional odds ratio is \(\exp(\beta_A)\). Marginally, however, each treatment probability is an integral of the expit function. Since the expit function is nonlinear, integrating first and then taking odds does not generally yield the same result as taking conditional odds first. Thus a marginal odds ratio formed from those two integrated probabilities need not equal \(\exp(\beta_A)\). This is the non-collapsibility of the odds ratio, not an arithmetic error.
Worked Example: Averaging Illustrative Conditional Predictions
Use a hypothetical random-intercept logistic model with intercept \(-1.20\), treatment coefficient \(0.80\), no visit effect for this illustration, and random-intercept variance 1. The exact marginal probabilities require integration over a standard normal distribution. To show the calculation transparently, approximate that distribution by a three-point distribution with values \(-1.732,0,1.732\) and weights \(1/6,2/3,1/6\). This is an illustrative approximation, not a replacement for fitting the GLMM.
For control, the conditional probabilities at those three points are \(\operatorname{expit}(-2.932)=0.0506\), \(\operatorname{expit}(-1.20)=0.2315\), and \(\operatorname{expit}(0.532)=0.6299\). The weighted average is
For treatment, add \(0.80\) to each linear predictor. The probabilities are \(\operatorname{expit}(-2.132)=0.1060\), \(\operatorname{expit}(-0.40)=0.4013\), and \(\operatorname{expit}(1.332)=0.7912\). Therefore,
The resulting approximate marginal odds ratio is $$ \frac{0.4171/(1-0.4171)}{0.2677/(1-0.2677)} \approx \frac{0.7156}{0.3656}=1.957. $$ The conditional odds ratio is \(\exp(0.80)=2.226\), whereas this approximate marginal odds ratio is about 1.96. The difference arises because the calculation averages probabilities across heterogeneous subjects before converting them to odds.
Interpreting Predictions at a Particular Visit
A coefficient comparison is often clearer when paired with predictions in probability units. For a GLMM, a prediction at \(b_i=0\) describes a subject with a random intercept at its population mean; it is not the population-average probability. For a GEE, a prediction from the population-marginal mean model is the modeled mean given the covariates; the working dependence structure is used in estimation and does not define that mean. Predictions must therefore be labelled according to how they were obtained.
Worked Example: Visit-Specific GEE Probabilities
Suppose a hypothetical fitted GEE has intercept \(-1.00\), treatment coefficient \(0.55\), and visit coefficient \(0.30\), where the later visit is coded \(t=1\) and the earlier visit \(t=0\). Assume this mean model adequately represents the marginal probabilities for these visits and treatment groups.
At the later visit, the control linear predictor is \(-1.00+0.30=-0.70\), giving the fitted marginal probability \(\operatorname{expit}(-0.70)=0.3318\). For treatment, the linear predictor is \(-1.00+0.55+0.30=-0.15\), giving \(\operatorname{expit}(-0.15)=0.4626\).
The corresponding fitted odds are \(0.3318/(1-0.3318)=0.4966\) for control and \(0.4626/(1-0.4626)=0.8608\) for treatment. Their ratio is approximately \(0.8608/0.4966=1.733\), matching \(\exp(0.55)=1.733\), apart from rounding. The model therefore estimates higher population-averaged event odds under treatment at this visit; it does not estimate that treatment increases each subject’s probability by the same number of percentage points.
Diagnostics, Alternatives, and Limitations
A comparison is informative only if each model’s assumptions and fit are credible. For the GLMM, inspect convergence and whether the estimated random-intercept variance is plausible; check whether the mean structure captures important visit patterns and whether conditional predictions are compatible with observed outcomes. For the GEE, assess whether the marginal mean specification is reasonable, including whether the treatment contrast appears to vary across visits. A missing treatment-by-visit interaction can obscure changing effects, even when the repeated measurements are handled appropriately.
Other warning signs include sparse outcomes that produce unstable estimates, separation that yields very large coefficients or standard errors, and a small number of independent subjects that makes large-sample inference questionable. Repeated records do not create additional independent subjects. Strong sensitivity of conclusions to plausible model specifications is a reason to report that uncertainty, not to select whichever result is more favorable.
| Approach | Primary treatment interpretation | Useful when |
|---|---|---|
| Logistic random-intercept GLMM | Conditional odds ratio for subjects with the same random effect | Subject-level heterogeneity and conditional predictions are central |
| Logistic GEE | Population-averaged odds ratio from the marginal mean model | The population-average mean contrast is the main target |
| Marginal predictions from a GLMM | Contrasts formed after averaging GLMM predictions over random effects | Population-scale probability summaries are desired alongside a GLMM |
Neither approach dominates for every question. A GLMM uses a model for the distribution of random effects and can support subject-specific predictions, but results can depend on those distributional and mean-model assumptions. A GEE targets a marginal mean without specifying that latent distribution, but its inferential performance relies on adequate numbers of independent subjects and an appropriate marginal mean model. A marginal odds ratio obtained by averaging a GLMM is a further summary; it need not equal either model’s fitted treatment coefficient.
Common Pitfall
Correction: The GLMM and GEE coefficients have distinct conditional and marginal estimands. Logistic odds ratios are non-collapsible, so they can differ even when both models are correctly specified for their respective targets. Compare the models’ assumptions, fitted means, uncertainty, and scientific interpretations before judging whether a discrepancy signals a problem.
Also avoid translating an odds ratio directly into a probability difference. The probability change depends on baseline risk and, for the GLMM, on the random effect being conditioned on or averaged over. State the scale and target population whenever reporting an effect.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- A GLMM treatment coefficient is \(0.40\). What is its conditional odds ratio, and what does it condition on?
- A GEE treatment coefficient is \(0.30\). Explain why its odds ratio need not equal the GLMM odds ratio, even if the models use the same treatment indicator.
- Why is a GLMM prediction at \(b_i=0\) not automatically a population-average probability?
- A study has 40 subjects measured at 5 visits each. How many independent subject-level units are there for the large-sample GEE justification?
Solutions. (1) The conditional odds ratio is \(\exp(0.40)=1.492\). It compares treatment with control at the same visit and the same random-intercept value. (2) The GEE coefficient describes a population-averaged mean contrast; the GLMM coefficient is conditional on the random effect. Averaging probabilities through the nonlinear expit function generally changes the odds ratio. (3) Setting \(b_i=0\) gives the prediction for a subject at the mean of the random-intercept distribution. A population average instead integrates conditional probabilities over that distribution. (4) There are 40 independent subject-level units, not 200; visits within a subject are repeated measurements.