TriaLab Power Studio · Method
Rate of change — two slopes compared
Sizes a trial whose endpoint is how fast the outcome changes rather than where it stands at any one visit: a rate of decline, a progression slope. What the design turns on is when the visits are, not how many there are.
Also known as: rate of change, slope, linear trend over time, progression, rate of decline, random slopes, growth curve, visit schedule, Diggle.
Maturity
Validated: 5 published examples from 2 independent publications (Machin, Campbell, Tan & Tan 2018; PASS) reproduce on every build (ADR-0001 §58).
What it solves for
- Sample size: offered.
- Power: offered.
- Detectable effect: offered.
- Precision: not offered — Sizing to a confidence-interval half-width for the difference in slopes is well defined, but no source on disk works an example of it, so it is not offered rather than offered unchecked.
- Assurance: not offered — No source on disk states a prior on this design’s effect, so the assurance modifier is not admitted here.
- Duration: not offered — Solving for the follow-up length that reaches a target power is a real question here — the spread of the visit times grows with its square — but the duration target has no solver yet; vary the schedule and read the size instead.
Size axes:
- Participants in total, across both arms (
participants_total), Count
Inputs
Every field as the form shows it, with its help. A field marked advanced sits behind Expert mode.
Common to every method
- Significance level (alpha) (
alpha): a number, above 0 and below 1; default 0.05; typically 0.01 to 0.05 (0.05 in most trials; 0.01 for confirmatory claims); entered as proportion (0-1) or percent The type I error rate. Interpreted as two-sided when testing plain equality and one-sided when a margin frame is active, following the usual convention. - Target power (
power_target): a number, above 0 and below 1; default 0.8; typically 0.8 to 0.9 (0.80 is conventional; 0.90 for definitive trials); entered as proportion (0-1) or percent The chance of a significant result if the assumed effect is real. Used when solving for sample size or detectable effect; ignored when solving for power.
The method’s own
- Number of measurements per participant (
visits): a whole number, at least 2 and at most 64; default 3; typically 3 to 10 (more visits help far less than a longer follow-up) How many times each participant’s outcome is measured, counting the baseline one. A slope needs at least two. - Spread of the visit times (D_t²) (
time_spread): a number, above 0; default 2 Machin’s Equation 10.10: the sum of squared visit times minus their squared sum over the number of visits. Measurements at 0, 2 and 5 years give 12.67. Enter the visit times or an even spacing instead and this is computed for you. - Interval between visits (
visit_spacing): a number, above 0; default 1 The time between consecutive measurements, when they are evenly spaced. In the same time unit the slope is expressed in: yearly visits with a slope in units per year is a spacing of 1. - Time of each measurement (
visit_time): one number per element, as many asvisitsWhen each measurement is taken, from baseline, in the same time unit as the slope. Diggle’s blood-pressure trial measures at 0, 2 and 5 years. Only the spread of these matters, so 0, 2, 5 and 1, 3, 6 size the same trial; moving the last one later is worth much more than adding one in the middle. - Difference in slopes to detect (
slope_difference): a number, any finite number; default 0.5 How much faster the outcome changes on one arm than the other, in outcome units per unit of time. Diggle’s trial looks for half a millimetre of mercury per year. - Standard deviation of the outcome (
sd): a number, above 0; default 10 The between-participant standard deviation of the measurements — the spread of the intercepts in a random-intercepts model. In the outcome’s own units, not per unit time. - Correlation between measurements on the same participant (
correlation): a number, at least 0 and below 1; default 0.2; typically 0.2 to 0.8 (repeated clinical measurements on one person) Compound symmetry: the same correlation between any two of a participant’s measurements. Correlation helps here, unlike in a single-visit comparison — a participant consistent with themselves gives a cleaner slope, so the trial gets smaller as this rises. - Sidedness of the equality test (
tails): a choice; defaulttwo_sidedMachin’s Equation 10.7 is two-sided, which is the usual shape for a comparison of two rates of change.two_sidedTwo-sided: Either direction rejects.one_sidedOne-sided: Only the anticipated direction rejects; alpha is spent on that tail.
Sizes entered when another axis is solved for
- Participants in total, across both arms (
participants_total): a whole number, at least 1 Participants in total, across both arms. Required when solving for power or detectable effect; produced by the solver when solving for sample size.
Ways to express an input
Visit schedule — When the measurements are taken. The design turns on how spread out they are, which is the one number these three spellings all reduce to.
- Spread of the visit times: Machin’s D_t², the one number the power depends on. (fields
time_spread) - Evenly spaced visits, the form’s default: One interval; the spread follows as s² w(w² − 1)/12. (fields
visit_spacing) - One time per visit: The schedule as the protocol states it. (fields
visit_time)
Modifiers admitted
allocation: Allocationdropout: Dropout
Published examples it reproduces (5)
Each is a worked example: the inputs as a user enters them, and the number the source prints, which the engine reproduces within the tolerance on every build (the Validation screen runs them on your machine).
| Source | Example | Solves for | Inputs | Published |
|---|---|---|---|---|
| Machin, Campbell, Tan & Tan 2018, Example 10.4 (printed pp. 165-166), after Diggle, Heagerty, Liang & Zeger 2002 | Blood pressure measured at 0, 2 and 5 years, a decline differing by 0.5 mmHg per year, intercept SD 10 mmHg, correlation 0.2, two-sided alpha 0.05, power 0.80 => 794 participants (Machin rounds this up to a round number for the protocol) | Sample size | alpha = 0.05; correlation = 0.2; power_target = 0.8; sd = 10; slope_difference = 0.5; visit_time = (0, 2, 5); visits = 3; schedule expressed as times |
participants_total = 794 ± 0 |
| Machin, Campbell, Tan & Tan 2018, Example 10.4 (printed pp. 165-166), after Diggle, Heagerty, Liang & Zeger 2002 | Blood pressure measured at 0, 2 and 5 years, a decline differing by 0.5 mmHg per year, intercept SD 10 mmHg, correlation 0.5, two-sided alpha 0.05, power 0.80 => 496 participants (Machin rounds this up to a round number for the protocol) | Sample size | alpha = 0.05; correlation = 0.5; power_target = 0.8; sd = 10; slope_difference = 0.5; visit_time = (0, 2, 5); visits = 3; schedule expressed as times |
participants_total = 496 ± 0 |
| PASS 2026 chapter 399, Example 5 (printed p. 399-21), validating Ahn, Heo & Zhang 2015 p. 110 | Six measurements 0.2 apart, slope difference 28.6, SD 28.56, compound symmetry 0.1, no missing, two-sided 0.05, power 0.90 => 54 in all | Sample size | alpha = 0.05; correlation = 0.1; power_target = 0.9; sd = 28.56; slope_difference = 28.6; visit_spacing = 0.2; visits = 6; schedule expressed as equally_spaced |
participants_total = 54 ± 0 |
| PASS 2026 chapter 399, Example 5 (printed p. 399-21), validating Ahn, Heo & Zhang 2015 p. 110 | Six measurements 0.2 apart, slope difference 28.6, SD 28.56, compound symmetry 0.25, no missing, two-sided 0.05, power 0.90 => 45 in all | Sample size | alpha = 0.05; correlation = 0.25; power_target = 0.9; sd = 28.56; slope_difference = 28.6; visit_spacing = 0.2; visits = 6; schedule expressed as equally_spaced |
participants_total = 45 ± 0 |
| PASS 2026 chapter 399, Example 5 (printed p. 399-21), validating Ahn, Heo & Zhang 2015 p. 110 | Six measurements 0.2 apart, slope difference 28.6, SD 28.56, compound symmetry 0.4, no missing, two-sided 0.05, power 0.90 => 36 in all | Sample size | alpha = 0.05; correlation = 0.4; power_target = 0.9; sd = 28.56; slope_difference = 28.6; visit_spacing = 0.2; visits = 6; schedule expressed as equally_spaced |
participants_total = 36 ± 0 |
Sources
- Machin D, Campbell MJ, Tan SB, Tan SH. Sample Sizes for Clinical, Laboratory and Epidemiology Studies. 4th ed. Chichester: Wiley; 2018. §10.2, Equations 10.7, 10.10 and 10.11, Example 10.4.
- Diggle PJ, Heagerty P, Liang K-Y, Zeger SL. Analysis of Longitudinal Data. 2nd ed. Oxford: Oxford University Press; 2002. ch. 2.
This page was generated from TriaLab Power Studio 2.0.1's engine, as the method is built, and is published in English only. All methods →