Statistical Calculators › Mixed Models and Longitudinal Data › Longitudinal Binary Outcome Sample Size
← All Calculators

Mixed Models and Longitudinal Data

Longitudinal Binary Outcome Sample Size

Sample size planning for a two-group longitudinal study with repeated binary outcomes. This calculator implements the GEE time-averaged difference method documented in the statistical literature, accounting for treatment allocation, repeated-measure correlation, and incomplete observations. Runs entirely in your browser.

Study Design

Enter the anticipated response probabilities, repeated-measure structure, missingness, and desired power.

Sample Size Result

Based on the closed-form GEE variance for the time-averaged difference in repeated binary outcomes.
Enter study parameters and click Calculate Sample Size.

Methodology

This calculator uses the generalized estimating equation (GEE) approach for comparing time-averaged response probabilities between two groups with repeated binary outcomes. This is a parallel two-group design in which repeated binary measurements are correlated within subject. The primary comparison is the time-averaged difference between the groups.

Sample Size Formula

Let p1 and p2 denote the anticipated time-averaged response probabilities in Groups 1 and 2, and let r be the proportion assigned to Group 1. The treatment effect on the logistic scale is β2 = logit(p1) − logit(p2). this method gives the required total sample size as n = σ22 [z1−α/2 + z1−γ]2 / β22 for a two-sided test, where γ = 1 − power.

β2 = logit(p1) − logit(p2)

τ = r p1(1−p1) + (1−r)p2(1−p2)

σr2 = r(1−r)

σ22 = τ × [ Σj Σj' φjj'ρjj' / ( Σjφj )2 ] × σr2 / [p1(1−p1)p2(1−p2)]

n = σ22 [z1−α/2 + z1−γ]2 / β22

Here φj is the proportion observed at measurement time j, ρjj' is the within-subject correlation, and φjj' is the joint probability that both measurements are observed. this method permits independent, monotonic, and mixture specifications for these pairwise observation probabilities.

Correlation Structure

The calculator supports the four longitudinal correlation patterns most directly represented in the this method procedure here: compound symmetry, Banded(1), Banded(2), and traditional AR(1). Under traditional AR(1), correlations for measurements separated by d measurement intervals are ρd.

Missing Observations

Missing proportions are specified as a linear progression from the first measurement to the last measurement. Thus, for M measurements, the calculator creates the corresponding sequence of observed proportions and then constructs the pairwise observation probabilities according to the selected independent, monotonic, or mixture pattern. this method explicitly provides these missing-data specifications because simply discarding subjects with incomplete observations can give an inaccurate planning calculation.

Validation Example

This worked example: two groups, two-sided α = 0.05, power = 0.90, Group 1 allocation = 50%, three measurements, P1 = 0.58, P2 = 0.50, AR(1) correlation with ρ = 0.60, and missing proportions increasing linearly from 0% to 40%. Pairwise missingness is independent.

The implementation gives an unrounded sample size of approximately 1239.79, which is rounded upward to 1240 total subjects, matching the this method published example. With 50% allocation, this corresponds to 620 subjects per group.

References

1. Ahn, C., Heo, M., & Zhang, S. (2015). Sample Size Calculations for Clustered and Longitudinal Outcomes in Clinical Research. CRC Press, New York. Note that this book, Chapter 4, as the source for the technical details of its two-group repeated binary outcome GEE procedure.

2. Lou, Y., Cao, J., Zhang, S., & Ahn, C. (2017). “Sample Size Calculations for Time-Averaged Difference of Longitudinal Binary Outcomes.” Communications in Statistics — Theory and Methods, 46(1), 344–353. The paper develops a closed-form GEE sample-size formula for two-group longitudinal binary outcomes and explicitly accommodates missing-data and within-subject correlation structures.

3. Wang, J., Zhang, S., & Ahn, C. (2018). “Sample size calculation for comparing time-averaged responses in K-group repeated binary outcomes.” Communications for Statistical Applications and Methods, 25(3), 321–328. The paper extends the same GEE time-averaged-response framework to multiple groups.

the current documentation lists “GEE Tests for the TAD of Two Groups in a Repeated Measures Design (Binary Outcome)” as the relevant procedure for this two-group longitudinal binary-outcome calculation.