Repeated-Measures ANOVA Sample Size: Inputs, Examples, and Pitfalls

Interactive example

Adjust a sample size for attrition

Enter the analyzable sample and expected loss. The result is rounded up to the next whole participant.

Continue in DataStatPro

A repeated-measures ANOVA sample-size calculation must match the primary hypothesis. Power for a time effect is not the same as power for a group effect or a group-by-time interaction.

Inputs you need

Document these inputs before using a calculator:

  • Primary effect: within-person change, between-group difference, or interaction.
  • Expected effect size, with a clear definition and evidence source.
  • Significance level and desired statistical power.
  • Number of groups and repeated measurements.
  • Expected correlation among repeated observations.
  • Nonsphericity correction, often represented by epsilon.
  • Expected dropout, missing visits, or unusable records.

If one input is uncertain, calculate several justified scenarios rather than reporting false precision.

Why within-person correlation matters

Repeated measurements from the same participant are correlated. This dependence can improve precision for change estimates, but the gain depends on the covariance pattern and chosen hypothesis. A correlation copied from an unrelated population can therefore produce a misleading target.

Use pilot data or closely matched literature when available. Report whether the correlation is assumed constant or based on a more specific structure.

What the nonsphericity correction does

Sphericity concerns the variances of pairwise differences among repeated conditions. Violations reduce the effective degrees of freedom for common within-subject tests. An epsilon value below 1 represents that penalty in many power calculations.

Planning with epsilon equal to 1 assumes perfect sphericity. That can be optimistic when there are several measurements or an irregular follow-up schedule. A sensitivity analysis with a lower epsilon makes the consequence visible.

Worked planning example

Suppose a two-group study measures an outcome at baseline and three follow-up visits. The primary target is the group-by-time interaction. The planning record might specify:

Input Assumption
Groups 2
Measurements 4
Alpha .05
Power .80
Effect size Protocol-defined moderate interaction
Repeated correlation Based on pilot or comparable study
Epsilon Conservative value below 1
Attrition 15%

Calculate the analyzable sample first. If the model requires 102 complete participants and 15% attrition is expected, recruit using the inflation formula:

Nrecruit=Nanalyzable1rN_{recruit}=\frac{N_{analyzable}}{1-r}

With r=.15r=.15, the recruitment target is 102/.85=120102/.85=120. Round up and preserve any group-allocation requirements.

Common planning mistakes

Powering the wrong effect

A study described as longitudinal may still have a single primary contrast. Select the test that matches that contrast, not the broad label of the design.

Converting effect sizes without enough information

Do not convert partial eta squared, Cohen's f, or standardized mean differences as if every definition were interchangeable. The conversion must match the model and effect being tested. See the eta squared comparison guide.

Adding attrition incorrectly

Dividing by 1r1-r is not the same as multiplying by 1+r1+r. The difference grows as expected loss increases.

Ignoring missing-data strategy

Repeated-measures ANOVA may exclude participants with incomplete measurement sets. If missing visits are plausible, consider whether a mixed model better matches the planned analysis. The sample-size method must follow the actual primary model.

What to report in a proposal

State the primary hypothesis, statistical model, effect-size definition and source, alpha, power, group allocation, number and timing of measurements, correlation assumption, epsilon, software or method, analyzable target, attrition allowance, and final recruitment target.

The DataStatPro sample-size calculator can support scenario planning. Keep a dated record of every input so the calculation can be audited.

Frequently asked questions

How many participants do I need for repeated-measures ANOVA?

There is no universal number. It depends on the primary effect, effect size, power, alpha, groups, measurements, repeated correlation, nonsphericity, and expected attrition.

Does adding more measurements always reduce sample size?

No. Extra measurements can add information, but their benefit depends on correlation, covariance, measurement quality, missingness, and the hypothesis being tested.

Should I use repeated-measures ANOVA or a mixed model?

Use the model that matches the design and missing-data plan. Mixed models are often more flexible for irregular timing, incomplete observations, or complex covariance, but their sample-size planning may require simulation or specialized formulas.

Should dropout be included in the power calculation?

Power calculations usually estimate the analyzable sample. Inflate that target for expected loss and explain how the attrition rate was chosen.

Editorial review: DataStatPro Statistical Review. Examples are educational and should be adapted to the study design and destination requirements.