Skip to main content
v2026.11,610 entries · CC-BY 4.0

Generalized Estimating Equations (GEE): Working Correlation and When to Use Them Instead of a Mixed Model

GEE as a population-averaged alternative to mixed models for correlated and clustered data: choosing a working correlation structure (exchangeable, AR(1), unstructured), why the robust sandwich estimator survives misspecifying it, and when a subject-specific mixed model is the better tool instead.

Ask about Generalized Estimating Equations (GEE): Working Correlation and When to Use Them Instead of a Mixed Model

Answers are drawn from this guide and the rest of the CASRAI corpus, with a link to every source.

Answers are AI-generated from CASRAI’s own published pages and can be wrong, so check the linked sources before relying on one; your question is logged without personal data — never sold, never used to train a third-party model — to show us what CASRAI is missing, so please do not type personal or confidential details. How we use this

Written and maintained by CASRAI Editorial Board

Last updated

When repeated or clustered observations aren’t independent — the same patients measured at multiple visits, students nested within classrooms, sites participating in a multi-center trial — ordinary regression’s independence assumption breaks, and standard errors come out wrong if you ignore it. Generalized estimating equations (GEE) are one of the two standard fixes, alongside mixed (hierarchical) models. GEE takes a different route to a valid answer: instead of modeling the correlation structure explicitly through random effects, it treats the correlation as a nuisance to be accounted for, not estimated precisely, and gets valid standard errors even when that accounting is imperfect. This guide covers what GEE actually estimates, how to choose a working correlation structure, why getting that choice wrong doesn’t invalidate the model the way it would in ordinary regression, and the population-averaged vs. subject-specific distinction that decides whether GEE or a mixed model is the right tool for a given question.

The Problem: Correlated Data Breaks the Independence Assumption

Ordinary least squares, logistic regression, and Poisson regression all assume each observation is statistically independent of every other. That assumption is routinely false in research data with a clustering or repeated-measures structure: a patient’s blood pressure reading today is correlated with their reading last month; students in the same classroom share a teacher, resources, and unmeasured context that makes their outcomes more alike than two students drawn at random from the district. Fitting an ordinary GLM to data like this doesn’t bias the point estimates of the regression coefficients, but it does understate their standard errors — treating correlated observations as if they carried as much independent information as truly independent ones overstates precision, narrows confidence intervals, and inflates Type I error rates on hypothesis tests.

GEE, introduced by Liang and Zeger (1986), extends the generalized linear model framework to handle this directly. Rather than specifying a full joint probability distribution for each cluster of correlated observations — which would require getting every aspect of the dependence structure right — GEE specifies only three things: a link function and linear predictor for the marginal mean (exactly as in an ordinary GLM), a variance function appropriate to the outcome type, and a working correlation structure describing the expected pattern of within-cluster correlation. The resulting estimating equations are solved iteratively, and under mild conditions the coefficient estimates are consistent for the true population-averaged effects even if the working correlation structure isn’t exactly right.

Population-Averaged vs. Subject-Specific: The Distinction That Decides Which Model You Need

The single most consequential difference between GEE and a random-effects (mixed) model isn’t computational, it’s about what the coefficients mean.

GEE estimates population-averaged (marginal) effects: a coefficient answers “if this predictor increased by one unit across the whole population, how would the average response change?” It describes the population, not any individual within it.

A random-effects model estimates subject-specific (conditional) effects: a coefficient answers “for a given individual, holding that individual’s own random effect fixed, how does their expected response change if this predictor increases by one unit?” It describes within-subject change.

For a linear model with an identity link, these two quantities are numerically identical — the distinction is invisible and the choice between GEE and a mixed model comes down to other considerations (below). For a nonlinear link — logistic regression on a binary outcome, log-linear/Poisson regression on a count — the two diverge. This is a consequence of non-collapsibility: averaging a nonlinear function of an individual-level effect across a population is not the same as evaluating that function at the population-average predictor value. In practice, population-averaged (GEE) coefficients on a nonlinear-link model tend to be attenuated — smaller in magnitude — relative to the corresponding subject-specific (mixed-model) coefficients, and the gap widens as between-subject heterogeneity (the random-effects variance) grows. Zeger, Liang, and Albert’s 1988 extension of the original GEE paper worked through this comparison directly and is the standard reference for why the two approaches are not interchangeable once the link is nonlinear.

This is not a nuisance to average away — it’s a question of which quantity actually answers your research question. A health-policy question (“if we raised the vaccination rate by 10 points, how would the population’s infection rate change?”) is population-averaged and belongs to GEE. A clinical question (“if this specific patient’s dose increases, how does their individual risk change?”) is subject-specific and belongs to a mixed model.

Choosing a Working Correlation Structure

The working correlation structure is GEE’s way of telling the model roughly how correlated observations within the same cluster are expected to be. It does not need to be exactly correct — that’s the point of the robustness property below — but choosing one that’s a reasonable approximation to the truth improves efficiency (tighter standard errors) even though it isn’t required for validity. The common options:

  • Independence. Assumes zero within-cluster correlation — equivalent to an ordinary GLM for the point estimates, with the sandwich variance estimator (below) still correcting the standard errors. This is the safest default when you have no strong prior belief about the correlation pattern, and it’s a valid, if less efficient, choice in every case.
  • Exchangeable (compound symmetry). Assumes every pair of observations within a cluster is equally correlated, regardless of how far apart they are. This fits naturally clustered data with no inherent ordering — patients within a clinic, students within a classroom — where there’s no reason one pair of cluster-mates should be more correlated than another pair.
  • AR(1) (first-order autoregressive). Assumes correlation decays as the time lag between two observations grows — adjacent visits are more correlated than visits far apart. This is the natural choice for equally-spaced longitudinal or repeated-measures data where time order matters.
  • Unstructured. Estimates a separate correlation parameter for every pair of time points, with no assumed pattern at all. Most flexible, but it estimates the most parameters, so it needs a reasonably large number of clusters relative to the number of repeated measurements per cluster to remain stable — it’s typically only practical with a small, fixed number of time points measured on every subject.
  • m-dependent. A middle ground between AR(1) and unstructured: correlation is freely estimated up to a lag of m time points apart, and assumed zero beyond that.

A reasonable default workflow: pick the structure that matches the substantive design (exchangeable for non-ordered clusters, AR(1) for ordered repeated measures), fit the model, and treat the choice as a tuning decision for efficiency rather than a validity requirement.

Why a Misspecified Working Correlation Isn’t Fatal

This is GEE’s defining practical advantage. Liang and Zeger showed that the coefficient estimates remain consistent, and — critically — the standard errors remain asymptotically valid, even when the working correlation structure doesn’t match the true correlation pattern, as long as the marginal mean model itself is correctly specified. This works because GEE pairs the working-correlation-based point estimates with a robust (“sandwich” or empirical) variance estimator: rather than trusting the variance implied by the working correlation structure, it computes standard errors directly from the observed variability of the data across clusters. Get the working correlation structure wrong and you lose some statistical efficiency — the standard errors are somewhat wider than they would be with the right structure — but you don’t get invalid inference the way you would from, say, ignoring the correlation altogether with ordinary regression.

That robustness has a real limit worth naming: the sandwich estimator’s validity is an asymptotic (large-sample) result, and with a small number of independent clusters it is known to underestimate the true variance, producing standard errors that are too narrow. Small-sample bias-corrected variants of the sandwich estimator exist specifically for this situation, and are worth using instead of the default when the number of independent clusters is small rather than large — check whatever statistical software you’re using for a small-sample correction option before trusting default GEE output with few clusters.

GEE vs. Random-Effects (Mixed) Models

Dimension GEE Random-effects (mixed) model
What the coefficients mean Population-averaged (marginal) effect Subject-specific (conditional) effect
How correlation is handled Working correlation structure + robust sandwich SEs Explicit random-effects distribution (usually normal)
Consistency if the correlation/random-effects structure is wrong Coefficients stay consistent; only efficiency is lost Fixed-effect estimates can be biased if the random-effects distribution is badly misspecified
Missing-data assumption Standard (unweighted) GEE requires data missing completely at random (MCAR); weighted GEE relaxes this to MAR Likelihood-based, so valid under the weaker missing-at-random (MAR) assumption without extra weighting
What you get besides the fixed effects No variance-components decomposition — correlation is treated as a nuisance, not a quantity of interest Explicit between-cluster and within-cluster variance components, plus subject-level predictions
Best suited to Population-level/policy questions; when the correlation structure itself isn’t of scientific interest Individual-level prediction/interpretation; when you want to quantify how much variability is between- vs. within-cluster

Neither approach is more “correct” in the abstract — they answer different questions. Where the outcome is continuous with an identity link, the choice mostly comes down to the missing-data assumption and whether variance-component decomposition matters to you, since the coefficients themselves coincide. Where the link is nonlinear, the choice is really a choice about which effect — population-averaged or subject-specific — is the one your research question is actually asking about.

Selecting Among Working Correlation Structures: QIC

Ordinary AIC and BIC rely on a genuine likelihood function, which GEE doesn’t have — it’s fit via a quasi-likelihood estimating-equations approach, not full maximum likelihood. Pan (2001) proposed the quasi-likelihood under the independence model criterion (QIC) specifically to fill this gap: it’s an AIC-analog built from the quasi-likelihood evaluated under a working-independence model, penalized for model complexity, and it can be used to compare candidate working correlation structures (and candidate sets of predictors) fit to the same data. Lower QIC indicates a better-fitting combination of mean structure and working correlation. It’s a useful, purpose-built tool for this specific comparison — but because it’s an approximation built around quasi-likelihood rather than a true likelihood, treat it as one input into the correlation-structure decision alongside the substantive design logic in the section above, not as an automatic override of it.

Practical Considerations

A few things worth knowing before fitting a GEE model in practice:

  • Cluster count matters more than cluster size. The asymptotic properties GEE relies on — both for consistency of the sandwich variance estimator and for QIC — come from having a reasonably large number of independent clusters, not from having many observations within each cluster. A study with 15 clusters of 200 observations each is a harder case for standard GEE than one with 200 clusters of 15 observations each, even though both have 3,000 total observations.
  • Missing data. Standard GEE assumes data are missing completely at random (MCAR) — if the probability an observation is missing depends on other observed variables (but not the missing value itself), that’s missing at random (MAR), and unweighted GEE can produce biased estimates under it. Weighted GEE (inverse-probability weighting for the missingness mechanism) extends validity to the MAR case; a mixed model handles MAR without that extra step, because it’s likelihood-based.
  • Software. GEE is implemented in every major statistical package: geepack and gee in R, PROC GENMOD (with a REPEATED statement) in SAS, and xtgee in Stata are the common entry points.

Frequently Asked Questions

Is GEE just a robust version of ordinary regression?

Not quite. It shares the sandwich-estimator idea with cluster-robust standard errors bolted onto an ordinary GLM, but GEE also incorporates the working correlation structure into how the coefficients themselves are estimated (via the estimating equations), not just how their standard errors are computed afterward — which is what gives correctly-specified GEE models a genuine efficiency gain over ordinary regression plus a robust-SE correction, on top of the same robustness to correlation misspecification.

Can GEE handle a binary or count outcome, not just a continuous one?

Yes — that’s the “generalized” part of the name. GEE extends to any link/variance combination a GLM supports: logistic-link GEE for binary outcomes, log-link GEE for counts, exactly as ordinary logistic or Poisson regression would, just with the correlation structure and robust variance added on top.

Do I need to test whether my chosen working correlation structure is “correct”?

Not for validity — that’s the whole point of the robustness property above. It’s still worth choosing a structure that plausibly matches the data’s design (exchangeable for non-ordered clusters, AR(1) for ordered repeated measures) for efficiency, and QIC can help compare candidates, but there’s no requirement to prove the structure is exactly right before trusting the output.

How small can my number of clusters be before GEE’s standard errors become unreliable?

There’s no universal cutoff, but the sandwich variance estimator’s downward bias with few clusters is a well-documented practical concern, and a small-sample bias-corrected variant is worth using rather than the default whenever the number of independent clusters is in the low double digits or fewer.

Should I report both a GEE and a mixed-model result for the same data?

Only if you have a genuine reason to want both a population-averaged and a subject-specific answer to the same question — running both routinely and picking whichever gives a more favorable p-value is a form of undisclosed multiple comparisons, not legitimate sensitivity analysis. Pick the estimand your research question actually calls for first, then fit the model that estimates it.

See also: Bayesian hierarchical models for the random-effects/partial-pooling alternative discussed throughout this guide, cluster-randomised trials and the intracluster correlation coefficient and cluster sampling for the design side of correlated-data structures, longitudinal study design for the repeated-measures context GEE is most often applied to, and regression analysis for the underlying GLM framework GEE extends. For the full series, see the Research Methods & Statistics hub.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 44,322 indexed passages, and every answer cites the ones it drew on.