GEE and mixed-effects logistic regression
Analyzes a yes/no outcome measured repeatedly in the same patients, or in clustered patients, accounting for the correlation within patients or clusters.
Clinical example
Readmission within 30 days (yes or no) for patients treated by different surgeons, where patients of the same surgeon are more alike than patients of different surgeons.
When to use it
- The outcome is yes or no and measured three or more times per patient, or patients are clustered.
- You need to adjust for other variables.
- You know whether you want an odds ratio within a patient or cluster (mixed model) or averaged over the population (GEE).
Assumptions to check
Correct clustering variable
The variable that says which measurements belong together (patient, ward, hospital) has to be right.
Choose the interpretation you need
A mixed model gives odds ratios conditional on the patient or cluster. GEE gives population-averaged odds ratios, usually closer to 1. Say which one you report.
Check first
- GEE gives population-average effects, GLMM gives patient-level effects; pick one before analysis
What to report
- Odds ratio with 95% CI, and whether it is conditional or population-averaged
- The clustering variable and the correlation structure or random effects used
- The number of patients and of measurements
Common mistakes
Repeated measurements aren't independent
Treating several measurements per patient as separate patients makes confidence intervals too narrow and p-values too small.
An odds ratio is not a risk ratio
When the outcome is common (more than about 10% of patients), the odds ratio is further from 1 than the risk ratio. Log-binomial regression gives a risk or prevalence ratio instead. Don't describe an odds ratio of 2 as "twice the risk".
Alternatives
| If your situation is… | Use |
|---|---|
| One measurement per patient | Logistic regression |
| Exactly two measurements per patient, or matched pairs | McNemar test |
In your software
# R (long format: one row per measurement)
library(lme4)
fit <- glmer(readmitted ~ arm + age + (1 | surgeon_id), family = binomial, data = cohort)
summary(fit)
GENLIN readmitted (REFERENCE=FIRST) WITH arm age
/MODEL arm age DISTRIBUTION=BINOMIAL LINK=LOGIT
/REPEATED SUBJECT=surgeon_id CORRTYPE=EXCHANGEABLE
/PRINT SOLUTION (EXPONENTIATE).