GEE — population-averaged regression with robust SE
VerifiedAdvanced & specialized
Run this test straight away on a free built-in teaching dataset — no data of your own needed — or bring your own. Either opens the guided workspace: variable setup, assumption diagnostics, results with effect sizes and confidence intervals, figures, and APA-ready reporting.
Loading teaching datasets…
Or use your own dataset
Loading your datasets…
Fits a marginal (POPULATION-AVERAGE) regression for clustered or longitudinal outcomes.
Reports coefficients with Liang-Zeger ROBUST SANDWICH standard errors, QIC-based working-correlation selection across {independence, exchangeable, AR(1), unstructured} candidates, naïve-vs-robust SE comparison (robust SEs are valid even under wrong working correlation), and a population-average interpretation that contrasts with LMM's subject-specific one. Standard tool for clinical trials with repeated measures, multi-centre RCTs, and any clustered design where the population-average effect is the substantive estimand.
Worked example
What is the population-average effect of a programme on repeated binary outcomes?
Repeated yes/no adherence measures per patient were modelled with GEE (exchangeable correlation) for a marginal, population-averaged effect.
The programme roughly doubled the population-averaged odds of adherence (OR = 2.01, 95% CI [1.35, 2.99], p < .001).
A GEE (population-averaged) analysis showed the programme significantly increased adherence odds, OR = 2.01, 95% CI [1.35, 2.99], p < .001.
Try it yourself: Load this ready-made sample and follow the run above.
When to use it
- Repeated measures — population-average inferenceBlood pressure across 4 clinic visits per patient (n = 200 patients × 4 visits).
- Clustered cross-sectional designTest score ~ ses + teacher-quality, clustered by school (n = 5000 students in 80 schools).
When NOT to — use instead
- Independent observations (no clustering)Use linear / logistic / Poisson regression — clustering structure isn't needed. → Linear Regression \u2014 OLS (continuous y + predictors)
- Subject-specific effects of interestGEE gives population-average effects only. → Linear Mixed Effects (LMM) \u2014 clustered / repeated data (ICC, BLUPs)
- Missing-not-at-random dataGEE assumes MCAR for unbiasedness. → Linear Mixed Effects (LMM) \u2014 clustered / repeated data (ICC, BLUPs)
- Few clusters (< 10)Sandwich SE is unstable with few clusters. → Linear Mixed Effects (LMM) \u2014 clustered / repeated data (ICC, BLUPs)
Hypotheses
Parameter tested: vector of marginal coefficients β
Assumptions (and what to do if they fail)
Check: Lowest-QIC structure.
If violated: Good news: robust sandwich SE is VALID even when the working correlation is wrong — it just loses efficiency.
Check: Per-coefficient robust/naïve SE ratio.
If violated: Robust SE remains valid; large divergence is informational only.
Check: Min observations per cluster.
If violated: Singleton clusters contribute only to coefficient estimates, not to within-cluster correlation.
Ready to run a GEE — population-averaged regression with robust SE on your own data?
Guided setup, automatic assumption checks, effect sizes, figures and an APA write-up.
Run this test →