TriaLab Power Studio · Method
Two means in a stepped-wedge cluster-randomised trial
Sizes a cross-sectional stepped-wedge trial — every cluster starts under control and crosses to the treatment at one of the steps, with different participants measured at each period — for a continuous outcome, by Hussey & Hughes’s variance of the treatment effect in a linear mixed model with period effects and a cluster effect. Solves for the number of clusters or the participants per cluster per period; the leftover clusters are placed at the steps of most power.
Also known as: stepped wedge, stepped-wedge, Hussey and Hughes, cross-sectional stepped wedge, steps, cluster crossover in one direction.
Maturity
Validated: 20 published examples from 2 independent publications (Hooper, Teerenstra, de Hoop & Eldridge 2016; PASS) reproduce on every build (ADR-0001 §58).
What it solves for
- Sample size: offered.
- Power: offered.
- Detectable effect: offered.
- Precision: not offered — A confidence interval for the treatment effect is defined — it is the same variance — but no source on disk sizes a stepped-wedge trial to one.
- 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 — The periods are a design parameter, not a calendar axis to solve along.
Size axes:
- Clusters (K) (
clusters), Count - Participants per cluster per period (m) (
participants_per_cluster_period), 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
- Difference to detect (μ₁ − μ₂) (
difference): a number, any finite number; default 0.2 The treatment effect the trial should be able to detect: the treatment mean minus the control mean, in the outcome’s own units. - Control mean (μ₂) (
mean_control): a number, any finite number; default 0 The mean under control, also the μ₂ the coefficient of variation of the cluster means is taken relative to. - Treatment mean (μ₁) (
mean_treatment): a number, any finite number The mean under treatment. - Standard deviation of the outcome (σ) (
sd): a number, above 0; default 1 The subject-to-subject standard deviation, read as the total or the within-cluster one by the choice below. - Intracluster correlation (ρ) (
icc): a number, at least 0 and below 1; default 0.05 The share of the outcome’s variance that sits between clusters, τ²/(τ² + σ_w²). Take it from a published table for the outcome and setting. - Coefficient of variation of the outcome between clusters (τ/μ₂) (
outcome_cov): a number, above 0 The between-cluster standard deviation of the cluster means divided by the control mean — Hussey & Hughes’s spelling for a proportion or a rate. The between-cluster variance is τ² = (COV · μ₂)². - The variance is (
variance_is): a choice; defaulttotalWhether the standard deviation entered is the total variance σ_y² = τ² + σ_w², from which the between-cluster part is τ² = ρσ_y², or the within-cluster variance σ_w², from which τ² = ρσ_w²/(1 − ρ). PASS offers both; Hemming & Taljaard’s examples enter the total, Hussey & Hughes’s the within.totalThe total variance: τ² = ρσ², σ_w² = σ² − τ².withinThe within-cluster variance: σ_w² = σ², τ² = ρσ²/(1 − ρ).
- Number of steps (S) (
steps): a whole number, at least 1 and at most 20; default 4 How many times clusters cross from control to treatment. The design has S + 1 periods, the first with every cluster under control; with K clusters, ⌊K/S⌋ cross at each step and the K − S⌊K/S⌋ left over are placed at the steps that give the most power (PASS’s balanced assignment, Hussey & Hughes’s variance). - Correlation over periods (
correlation_structure): a choice; defaultexchangeableHow strongly a cluster’s periods resemble one another. Hussey & Hughes assume every pair of periods is as correlated as two participants in the same period; a cluster autocorrelation below one lets the cluster drift between periods, and a decay lets the resemblance fade with the time between them. The last two need the cluster autocorrelation below.exchangeableExchangeable (Hussey & Hughes): One random cluster effect; the cluster autocorrelation is 1.block_exchangeableCluster autocorrelation (Hooper, Girling & Hemming): A cluster effect and a cluster-by-period effect: any two periods of a cluster correlated by the within-period ICC times π.exponential_decayExponential decay (Kasza et al.): Periods j apart correlated by the within-period ICC times r^j.
- Cluster autocorrelation (π, or r per period) (
cluster_autocorrelation): a number, above 0 and at most 1; default 0.8 Read unless the structure is exchangeable: the correlation between two population means of the same cluster in different periods (π), or, under the decay, in adjacent periods (r). Hemming et al. 2020 cite 0.8 to 0.9 as typical. - Participants over periods (
cohort): a choice; defaultcross_sectionalWhether each period samples fresh participants (repeated cross-sections) or follows the same participants from the first period to the last (a closed cohort, which needs the individual autocorrelation below).cross_sectionalRepeated cross-sections: New participants in every period.closed_cohortClosed cohort (Hooper et al. 2016): The same m participants per cluster, measured in every period.
- Individual autocorrelation (τ), closed cohort (
individual_autocorrelation): a number, at least 0 and below 1; default 0.5 Read only for a closed cohort: the correlation between two measurements of the same participant in different periods.
Sizes entered when another axis is solved for
- Clusters (K) (
clusters): a whole number, at least 1 Clusters (K). Leave empty to solve for it; fill it in to solve for the other size instead. - Participants per cluster per period (m) (
participants_per_cluster_period): a number, above 0; default 20 Participants per cluster per period (m). Leave empty to solve for it; fill it in to solve for the other size instead.
Ways to express an input
Effect size — The difference between the treatment and control means.
- Difference in means, the form’s default: The difference in the outcome’s own units. (fields
difference) - Two group means: Enter both means; the difference is derived, and the control mean serves the coefficient-of-variation spelling. (fields
mean_control,mean_treatment)
Between-cluster variability — How much the clusters differ from one another, as an intracluster correlation or as a coefficient of variation of the cluster means.
- Intracluster correlation, the form’s default: The ICC, the share of variance between clusters. (fields
icc) - Coefficient of variation of the outcome: τ/μ₂; converted to the ICC through the outcome’s variance. (fields
outcome_cov)
Modifiers admitted
frame: Hypothesis framedropout: Dropoutnonadherence: Non-adherence
Published examples it reproduces (20)
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 |
|---|---|---|---|---|
| PASS chapter 489, Example 1 (Hemming & Taljaard 2016, Table 5) | 10 clusters, 5 steps, 17 per cluster per period, ICC 0.01, a standardised difference of 0.2, two-sided 0.05 => power 0.54844 | Power | alpha = 0.05; clusters = 10; difference = 0.2; icc = 0.01; participants_per_cluster_period = 17; sd = 1; steps = 5 | power = 0.54844 ± 0.000005 |
| PASS chapter 489, Example 1 (Hemming & Taljaard 2016, Table 5) | 10 clusters, 5 steps, 17 per cluster per period, ICC 0.1, a standardised difference of 0.2, two-sided 0.05 => power 0.48864 | Power | alpha = 0.05; clusters = 10; difference = 0.2; icc = 0.1; participants_per_cluster_period = 17; sd = 1; steps = 5 | power = 0.48864 ± 0.000005 |
| PASS chapter 489, Example 1 (Hemming & Taljaard 2016, Table 5) | 10 clusters, 5 steps, 50 per cluster per period, ICC 0.01, a standardised difference of 0.2, two-sided 0.05 => power 0.91489 | Power | alpha = 0.05; clusters = 10; difference = 0.2; icc = 0.01; participants_per_cluster_period = 50; sd = 1; steps = 5 | power = 0.91489 ± 0.000005 |
| PASS chapter 489, Example 1 (Hemming & Taljaard 2016, Table 5) | 10 clusters, 5 steps, 50 per cluster per period, ICC 0.1, a standardised difference of 0.2, two-sided 0.05 => power 0.90211 | Power | alpha = 0.05; clusters = 10; difference = 0.2; icc = 0.1; participants_per_cluster_period = 50; sd = 1; steps = 5 | power = 0.90211 ± 0.000005 |
| PASS chapter 489, Example 3 (Hemming & Taljaard 2016, Table 3) | 2 steps, 10 per cluster per period, ICC 0.01, a standardised difference of 0.2, 80% power => 85 clusters | Sample size | alpha = 0.05; difference = 0.2; icc = 0.01; participants_per_cluster_period = 10; power_target = 0.8; sd = 1; steps = 2 | clusters = 85 ± 0 |
| PASS chapter 489, Example 3 (Hemming & Taljaard 2016, Table 3) | 2 steps, 10 per cluster per period, ICC 0.25, a standardised difference of 0.2, 80% power => 85 clusters | Sample size | alpha = 0.05; difference = 0.2; icc = 0.25; participants_per_cluster_period = 10; power_target = 0.8; sd = 1; steps = 2 | clusters = 85 ± 0 |
| PASS chapter 489, Example 3 (Hemming & Taljaard 2016, Table 3) | 9 steps, 10 per cluster per period, ICC 0.01, a standardised difference of 0.2, 80% power => 17 clusters | Sample size | alpha = 0.05; difference = 0.2; icc = 0.01; participants_per_cluster_period = 10; power_target = 0.8; sd = 1; steps = 9 | clusters = 17 ± 0 |
| PASS chapter 489, Example 3 (Hemming & Taljaard 2016, Table 3) | 9 steps, 10 per cluster per period, ICC 0.25, a standardised difference of 0.2, 80% power => 18 clusters | Sample size | alpha = 0.05; difference = 0.2; icc = 0.25; participants_per_cluster_period = 10; power_target = 0.8; sd = 1; steps = 9 | clusters = 18 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0, 80% power => 8 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 8 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0.1, 80% power => 12 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0.1; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 12 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0.2, 80% power => 11 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0.2; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 11 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0.3, 80% power => 10 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0.3; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 10 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0.4, 80% power => 9 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0.4; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 9 ± 0 |
| PASS chapter 489, Example 4 (Baio et al. 2015, Table 1) | 5 steps, 20 per cluster per period, σ 1.55, a difference of −0.3785, ICC 0.5, 80% power => 7 clusters by the balanced search | Sample size | alpha = 0.05; difference = -0.3785; icc = 0.5; participants_per_cluster_period = 20; power_target = 0.8; sd = 1.55; steps = 5 | clusters = 7 ± 0 |
| PASS chapter 489, Example 5 (Hemming & Taljaard 2016, Table 4) | 30 clusters, 2 steps, ICC 0.01, a standardised difference of 0.2, 80% power => 31 per cluster per period | Sample size | alpha = 0.05; clusters = 30; difference = 0.2; icc = 0.01; power_target = 0.8; sd = 1; steps = 2 | participants_per_cluster_period = 31 ± 0 |
| PASS chapter 489, Example 5 (Hemming & Taljaard 2016, Table 4) | 30 clusters, 2 steps, ICC 0.25, a standardised difference of 0.2, 80% power => 29 per cluster per period | Sample size | alpha = 0.05; clusters = 30; difference = 0.2; icc = 0.25; power_target = 0.8; sd = 1; steps = 2 | participants_per_cluster_period = 29 ± 0 |
| PASS chapter 489, Example 5 (Hemming & Taljaard 2016, Table 4) | 60 clusters, 5 steps, ICC 0.01, a standardised difference of 0.2, 80% power => 5 per cluster per period | Sample size | alpha = 0.05; clusters = 60; difference = 0.2; icc = 0.01; power_target = 0.8; sd = 1; steps = 5 | participants_per_cluster_period = 5 ± 0 |
| PASS chapter 489, Example 5 (Hemming & Taljaard 2016, Table 4) | 60 clusters, 5 steps, ICC 0.25, a standardised difference of 0.2, 80% power => 5 per cluster per period | Sample size | alpha = 0.05; clusters = 60; difference = 0.2; icc = 0.25; power_target = 0.8; sd = 1; steps = 5 | participants_per_cluster_period = 5 ± 0 |
| Hooper, Teerenstra, de Hoop & Eldridge 2016, §4.1 (Statistics in Medicine 35) | three-step closed cohort, m 10, ICC 0.33, CAC 0.9, IAC 0.7, δ 2, σ 5, 5% => power 89.3% at 12 clusters | Power | alpha = 0.05; cluster_autocorrelation = 0.9; clusters = 12; cohort = closed_cohort; correlation_structure = block_exchangeable; difference = 2; icc = 0.33; individual_autocorrelation = 0.7; participants_per_cluster_period = 10; power_target = 0.8; sd = 5; steps = 3 |
power = 0.893 ± 0.0005 |
| Hooper, Teerenstra, de Hoop & Eldridge 2016, §4.1 (Statistics in Medicine 35) | three-step closed cohort, m 10, ICC 0.33, CAC 0.9, IAC 0.7, δ 2, σ 5, 5% => the correlation between two cell means, r_CC = 0.8662 | Power | alpha = 0.05; cluster_autocorrelation = 0.9; clusters = 12; cohort = closed_cohort; correlation_structure = block_exchangeable; difference = 2; icc = 0.33; individual_autocorrelation = 0.7; participants_per_cluster_period = 10; power_target = 0.8; sd = 5; steps = 3 |
cell_mean_correlation = 0.8662 ± 0.00005 |
Sources
- Hussey MA, Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemp Clin Trials. 2007;28:182-191.
- NCSS, LLC. PASS 2026 documentation, chapter 489: Tests for Two Means in a Stepped-Wedge Cluster-Randomized Design. Kaysville, UT: NCSS, LLC; 2026.
- Hemming K, Taljaard M. Sample size calculations for stepped wedge and cluster randomised trials: a unified approach. J Clin Epidemiol. 2016;69:137-146.
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 →