Method document
Achieved power for comparing rates of change
Calculates the power of a comparison of the average rate of change (slope) between two groups measured repeatedly over a follow-up period.
https://statwisely.com/methods/power-longitudinal-slopes/
When to use it
- Assess a trial whose question is whether one group’s trajectory is steeper, such as a slower decline in lung function.
Not for
- Spreading the same visits over a longer period helps as much as adding visits; a short follow-up cannot estimate a slope well.
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.
- Variance of the visit times across the follow-up period.
Formulas
Variance of a participant’s slope
A participant’s own slope ignores where they started, so only within-person variance is left [1].
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 in slopes, in outcome units per unit of time.
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.
Follow-up period
Values: Positive
From the first to the last visit, in the slope’s time unit.
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 30 per group, 5 visits over 4 years, σ = 2, ρ = 0.5, and a slope difference of 0.3 per year at α = 0.05: s_t² = 2, so V = 4 × 0.5/(5 × 2) = 0.2.
Needed for analysis: 30 · To approach: 60
Open this example in the calculatorValidation
- At the size the rates-of-change 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 rates of change. Method document, engine version 1.0.0, reviewed 2026-10-03. https://statwisely.com/methods/power-longitudinal-slopes/
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.