TriaLab Power Studio · Method

Two proportions in a stepped-wedge cluster-randomised trial

Clustered & multilevel Validated 22 published examples

Sizes a cross-sectional stepped-wedge trial with a binary outcome by Hussey & Hughes’s variance of the treatment effect, the variance of one response taken from the proportions by the control’s, the pooled or the averaged formula, and the between-cluster variability as an intracluster correlation or a coefficient of variation. Solves for the clusters or the participants per cluster per period.

Also known as: stepped wedge proportions, stepped-wedge binary outcome, Hussey and Hughes, chlamydia.

Maturity

Validated: 22 published examples from 2 independent publications (Hemming et al. 2020; 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

  • Control proportion (P₂) (p_control): a number, above 0 and below 1; default 0.3; entered as proportion (0-1) or percent The proportion with the outcome under control — the baseline the clusters start at.
  • Difference to detect (P₁ − P₂) (difference): a number, above -1 and below 1; default -0.1; entered as proportion (0-1) or percent The treatment proportion minus the control proportion.
  • Treatment proportion (P₁) (p_treatment): a number, above 0 and below 1; entered as proportion (0-1) or percent The proportion with the outcome under treatment.
  • Ratio of proportions (P₁/P₂) (ratio): a number, above 0 The treatment proportion as a multiple of the control’s — Hussey & Hughes’s spelling.
  • Odds ratio (O₁/O₂) (odds_ratio): a number, above 0 The odds under treatment over the odds under control — Baio et al.’s spelling; P₁ = OR·O₂/(1 + OR·O₂).
  • Variance of one response (variance): a choice; default null Which proportion the binomial variance is computed from. Hussey & Hughes and Hemming & Girling use the control’s; Baio et al. the pooled; Hemming, Lilford & Girling the average of the two groups’.
    • null Control proportion, P₂(1 − P₂): PASS’s Method 1.
    • pooled Pooled, P̄(1 − P̄) at P̄ = (P₁ + P₂)/2: PASS’s Method 2.
    • group_average Average of the two groups’ variances: PASS’s Method 3.
  • 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; default within Whether the variance computed from the proportions 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.
    • total The total variance: τ² = ρσ², σ_w² = σ² − τ².
    • within The 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; default exchangeable How 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.
    • exchangeable Exchangeable (Hussey & Hughes): One random cluster effect; the cluster autocorrelation is 1.
    • block_exchangeable Cluster 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_decay Exponential 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; default cross_sectional Whether 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_sectional Repeated cross-sections: New participants in every period.
    • closed_cohort Closed 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 treatment proportion against the control’s, as a difference, a proportion or a ratio.

  • Difference in proportions, the form’s default: P₁ − P₂. (fields difference)
  • Treatment proportion: P₁ itself; the difference is derived. (fields p_treatment)
  • Ratio of proportions: P₁/P₂; the difference is derived. (fields ratio)
  • Odds ratio: O₁/O₂; the difference is derived. (fields odds_ratio)

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 frame
  • dropout: Dropout
  • nonadherence: Non-adherence

Published examples it reproduces (22)

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 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.50, COV 0.3, two-sided 0.05 => power 0.96458 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.5; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.96458 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.55, COV 0.3, two-sided 0.05 => power 0.92361 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.55; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.92361 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.60, COV 0.3, two-sided 0.05 => power 0.85387 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.6; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.85387 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.65, COV 0.3, two-sided 0.05 => power 0.75065 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.65; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.75065 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.70, COV 0.3, two-sided 0.05 => power 0.61788 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.7; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.61788 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.75, COV 0.3, two-sided 0.05 => power 0.46947 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.75; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.46947 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.80, COV 0.3, two-sided 0.05 => power 0.32539 Power alpha = 0.05; clusters = 24; outcome_cov = 0.3; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.8; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.32539 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.50, COV 0.5, two-sided 0.05 => power 0.94839 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.5; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.94839 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.55, COV 0.5, two-sided 0.05 => power 0.89805 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.55; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.89805 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.60, COV 0.5, two-sided 0.05 => power 0.819 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.6; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.819 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.65, COV 0.5, two-sided 0.05 => power 0.70974 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.65; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.70974 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.70, COV 0.5, two-sided 0.05 => power 0.5768 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.7; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.5768 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.75, COV 0.5, two-sided 0.05 => power 0.43445 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.75; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.43445 ± 0.000005
PASS chapter 231, Example 1 (Hussey & Hughes 2007’s chlamydia design) 24 counties, 4 steps of 6, 100 per county per interval, P₂ 0.05, ratio 0.80, COV 0.5, two-sided 0.05 => power 0.30041 Power alpha = 0.05; clusters = 24; outcome_cov = 0.5; p_control = 0.05; participants_per_cluster_period = 100; ratio = 0.8; steps = 4; variance_is = within; between_cluster expressed as outcome_cov; effect expressed as ratio power = 0.30041 ± 0.000005
PASS chapter 231, Example 2 (Hemming & Girling 2014) 10 clusters, 10 steps, 12 per cluster per period, 0.4 against 0.5, ICC 0.01, the control variance as the total => power 0.69978 Power alpha = 0.05; clusters = 10; icc = 0.01; p_control = 0.4; p_treatment = 0.5; participants_per_cluster_period = 12; steps = 10; variance_is = total; effect expressed as proportion power = 0.69978 ± 0.000005
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0, 80% power => 9 clusters Sample size alpha = 0.05; icc = 0; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 9 ± 0
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0.1, 80% power => 14 clusters Sample size alpha = 0.05; icc = 0.1; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 14 ± 0
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0.2, 80% power => 12 clusters Sample size alpha = 0.05; icc = 0.2; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 12 ± 0
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0.3, 80% power => 11 clusters Sample size alpha = 0.05; icc = 0.3; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 11 ± 0
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0.4, 80% power => 10 clusters Sample size alpha = 0.05; icc = 0.4; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 10 ± 0
PASS chapter 231, Example 4 (Baio et al. 2015, Table 1) 5 steps, 20 per cluster per period, P₂ 0.26, odds ratio 0.56, the pooled variance as the total, ICC 0.5, 80% power => 8 clusters Sample size alpha = 0.05; icc = 0.5; odds_ratio = 0.56; p_control = 0.26; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = pooled; variance_is = total; effect expressed as odds_ratio clusters = 8 ± 0
Hemming et al. 2020, Example 2 (International Journal of Epidemiology 49) five sequences × 4 clusters, m 20, 28% v 38%, two-sided 0.025, ICC 0.03, exponential decay 0.90 => power 78.6% Power alpha = 0.025; cluster_autocorrelation = 0.9; clusters = 20; correlation_structure = exponential_decay; icc = 0.03; p_control = 0.28; p_treatment = 0.38; participants_per_cluster_period = 20; power_target = 0.8; steps = 5; variance = group_average; variance_is = total; effect expressed as proportion power = 0.786 ± 0.0005

Sources

  1. Hussey MA, Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemp Clin Trials. 2007;28:182-191.
  2. NCSS, LLC. PASS 2026 documentation, chapter 231: Tests for Two Proportions in a Stepped-Wedge Cluster-Randomized Design. Kaysville, UT: NCSS, LLC; 2026.
  3. 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 →