Statistical Calculators › Mixed Models and Longitudinal Data › Generalized Estimating Equations (GEE) Sample Size Calculator
← All Calculators

Mixed Models and Longitudinal Data

Generalized Estimating Equations (GEE) Sample Size Calculator

Estimate the total number of subjects required for a two-arm longitudinal study with a continuous outcome analyzed using generalized estimating equations (GEE). The calculation accounts for repeated measurements and within-subject correlation through the working correlation matrix.

Study Design

Equal allocation between two treatment groups; continuous outcome with the same number of measurements per subject.
Exchangeable correlation assumes the same correlation between every pair of repeated measurements.

Required Sample Size

The result is rounded up to an even total sample size so that the two treatment groups remain equally allocated.
Enter the study assumptions and click Calculate Sample Size.

Methodology

This calculator implements the continuous-outcome, two-group special case of the generalized estimating equation sample-size framework described by Liu and Liang (1997). Their method extends generalized linear-model sample size calculations to correlated observations using the generalized score statistic. The GEE framework itself was introduced by Liang and Zeger (1986) for marginal modeling of correlated longitudinal data.

Sample Size Formula

For two equally sized treatment groups, a continuous outcome, equal numbers of repeated measurements, and a two-sided test, the required total number of subjects before rounding is

n = 4 × (z1−α/2 + z1−β)² × σ² / [ Δ² × (1′R−11) ]

Here, Δ is the treatment-group difference to be detected, σ is the marginal standard deviation, α is the two-sided type I error rate, 1−β is power, and R is the working correlation matrix for the repeated measurements. The quantity 1′R−11 describes how the correlation structure changes the amount of information contributed by the repeated observations.

Working Correlation Structures

Exchangeable: 1′R−11 = K / [1 + (K−1)ρ]

AR(1): 1′R−11 = [K(1−ρ) + 2ρ] / (1+ρ)

Independence: 1′R−11 = K

K is the number of repeated measurements per subject and ρ is the within-subject correlation. Under positive correlation, repeated observations provide less information than K independent observations. Consequently, the required number of subjects generally increases as the correlation increases.

Dropout Adjustment

If a proportion d of enrolled subjects is expected to be unavailable for the primary analysis, the calculated analyzable sample size is divided by (1−d). The enrollment target is then rounded upward to an even number for the specified 1:1 allocation.

Worked Validation Example

As a fixed implementation check, consider a two-arm longitudinal study with α = 0.05, 80% power, a treatment difference of 5 units, SD = 10 units, four measurements per subject, exchangeable correlation ρ = 0.50, and no dropout.

K = 4, ρ = 0.50
1′R−11 = 4 / [1 + 3(0.50)] = 1.6000
n = 4(1.959964 + 0.841621)²(10²) / [5²(1.6000)]
n = 78.49 → 80 subjects after upward rounding to an even total
40 subjects per treatment group

The calculator uses the same inputs and formula and therefore returns a total enrollment target of 80 subjects for this validation case.

References

Liu, G. & Liang, K. Y. (1997). Sample size calculations for studies with correlated observations. Biometrics, 53(3), 937–947. DOI: 10.2307/2533554.

PubMed: Liu & Liang (1997)

Zeger, S. L. & Liang, K. Y. (1986). Longitudinal data analysis for discrete and continuous outcomes. Biometrics, 42(1), 121–130.

PubMed: Zeger & Liang (1986)

PASS Statistical Software Documentation — official PASS documentation includes GEE procedures and technical sample-size details.

Scope: This implementation is the continuous-outcome, two-arm, equal-allocation special case with complete repeated measurements. Binary/count outcomes, unequal allocation, arbitrary covariate matrices, missing-data patterns, and general non-exchangeable correlation matrices require the corresponding specialized GEE sample-size formulation or numerical calculation.