Method document
Achieved power for comparing average levels over time
Calculates the power of a comparison of two groups’ average level across repeated measurements, which averages away within-person noise.
https://statwisely.com/methods/power-longitudinal-mean-level/
When to use it
- Assess a trial whose question is whether one group sits higher throughout follow-up, measured several times per participant.
Not for
- Extra measurements help less as their correlation rises: with ρ near 1 they add almost nothing.
Notation
- Group 1 size; group 2 has ⌈r n₁⌉.
- Measurements per participant.
- Standard deviation of one measurement.
- Correlation between a participant’s measurements.
- Variance one participant contributes to the comparison.
Formulas
Power from the rejection region
One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Parameters
Group 1 size
Values: Integer, at least 2
Participants available in group 1; group 2 follows from the allocation ratio.
Allocation ratioOptional
Values: Positive; 1 for equal groups
Group 2 has n₂ = ⌈r n₁⌉ participants.
Difference
Values: Any non-zero value
Difference between the groups’ average levels.
Standard deviation
Values: Positive
The SD of a single measurement.
Measurements per participant
Values: Integer, at least 2
Equally spaced visits, including baseline.
Correlation between measurements
Values: At least 0 and below 1
Compound symmetry: every pair of visits correlates equally.
Significance level
Values: Between 0 and 1
The type I error rate for the specified test.
Test direction
Values: 1 or 2
One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Assumptions
- Measurements are approximately normal with compound symmetry; other correlation structures can change power in either direction.
- One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.
Worked examples
A worked input set
With 300 per group, 5 measurements, σ = 2, ρ = 0.5, and a difference of 0.3 at α = 0.05: V = 4 × (1 + 4 × 0.5)/5 = 2.4.
Needed for analysis: 300 · To approach: 600
Open this example in the calculatorValidation
- At the size the average-level calculator returns, this power reaches that calculator’s target, and one fewer falls short; it is checked against an independent calculation in R.
How to cite
StatWisely. Achieved power for comparing average levels over time. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-longitudinal-mean-level/
Cite the original references for the formulas your design uses as well.
References
- 1.Diggle PJ, Heagerty P, Liang KY, Zeger SL. Analysis of Longitudinal Data. 2nd ed. Oxford: Oxford University Press; 2002.