Skip to main content

    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.

    Engine version 1.0.0 · Reviewed 3 October 2026

    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

    n1n_1
    Group 1 size; group 2 has ⌈r n₁⌉.
    mm
    Measurements per participant.
    σ\sigma
    Standard deviation of one measurement.
    ρ\rho
    Correlation between a participant’s measurements.
    VV
    Variance one participant contributes to the comparison.
    st2s_t^2
    Variance of the visit times across the follow-up period.

    Formulas

    Variance of a participant’s slope

    V=σ2(1−ρ)m st2,λ=∣Δ∣V(1/n1+1/n2),ν=n1+n2−2V=\frac{\sigma^2(1-\rho)}{m\,s_t^2}, \quad \lambda=\frac{|\Delta|}{\sqrt{V(1/n_1+1/n_2)}}, \quad \nu=n_1+n_2-2

    A participant’s own slope ignores where they started, so only within-person variance is left [1].

    Power from the rejection region

    Power=P(Tν,λ>t1−α/tails,ν)+Itails=2P(Tν,λ<−t1−α/tails,ν)\text{Power}=P(T_{\nu,\lambda}>t_{1-\alpha/\text{tails},\nu}) + I_{\text{tails}=2}P(T_{\nu,\lambda}<-t_{1-\alpha/\text{tails},\nu})

    One-sided tests use the upper rejection tail. Two-sided tests split α equally between both tails.

    Parameters

    Group 1 sizen1n_1

    Values: Integer, at least 2

    Participants available in group 1; group 2 follows from the allocation ratio.

    Allocation ratiorrOptional

    Values: Positive; 1 for equal groups

    Group 2 has n₂ = ⌈r n₁⌉ participants.

    DifferenceΔ\Delta

    Values: Any non-zero value

    Difference in slopes, in outcome units per unit of time.

    Standard deviationσ\sigma

    Values: Positive

    The SD of a single measurement.

    Measurements per participantmm

    Values: Integer, at least 2

    Equally spaced visits, including baseline.

    Correlation between measurementsρ\rho

    Values: At least 0 and below 1

    Compound symmetry: every pair of visits correlates equally.

    Follow-up periodTT

    Values: Positive

    From the first to the last visit, in the slope’s time unit.

    Significance levelα\alpha

    Values: Between 0 and 1

    The type I error rate for the specified test.

    Test directionss

    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 calculator

    Validation

    • 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. 1.Diggle PJ, Heagerty P, Liang KY, Zeger SL. Analysis of Longitudinal Data. 2nd ed. Oxford: Oxford University Press; 2002.