Stepped-Wedge Cluster Randomized Trials
Trials that randomize clusters to sequences determining when they switch from control to intervention, with outcomes measured across periods so calendar time and within-cluster dependence require explicit handling.
On this page
Trials that randomize clusters to sequences determining when they switch from control to intervention, with outcomes measured across periods so calendar time and within-cluster dependence require explicit handling. Use when phased cluster rollout is justified and randomized timing is feasible, with credible measurement before and after switches.
Definition and scope
Trials that randomize clusters to sequences determining when they switch from control to intervention, with outcomes measured across periods so calendar time and within-cluster dependence require explicit handling. The target population, use, and analysis remain protocol decisions; this card explains the choices and their consequences rather than approving a study.
Operational specification
Specify clusters, sequences, allocation, periods, transition/implementation windows, open or closed cohort, repeated patients, eligibility, exposure delivery, contamination, and the treatment-effect estimand. Preserve randomized sequence assignment and distinguish an actual stepped-wedge trial from observational staggered policy adoption.
Analysis and diagnostics
Model secular trends and cluster dependence with an analysis appropriate to outcome and cohort structure. Investigate treatment-by-time or duration effects rather than assuming a constant effect is always adequate. Document cluster/period sample sizes, delayed implementation, missing clusters, and any deviations. Power depends on clustering, number of sequences, periods, and correlation structure, not just the number of patient records.
When NOT to use and common errors
Do not interpret a pooled before-versus-after comparison as the randomized effect, assume eventual intervention for everyone removes ethical questions, or substitute observational rollout dates for randomization. Very few clusters and strong secular shocks can make inference fragile.
Worked example and implementation boundary
A synthetic rollout has four clusters and three periods, with 25 observed participants in every cluster-period. Calculate expected record count; these records are not 300 independent randomized units. There are 300 cluster-period participant records and four randomized clusters. This is a data-layout calculation, not power or treatment-effect estimation. The code performs that explicitly stated calculation with synthetic inputs. It is not a complete fitted analysis and does not demonstrate the identification assumptions, estimate sampling uncertainty, or certify application in another population.
Data-source and reporting requirements
Preserve the provenance, dates, units, and observation rule for each input. Claims capture services and transactions under observable benefits; absence of a record is not proof that an event or resource use did not occur. EHR and registry measurements depend on the collection process and may miss care outside the system. Linked sources add reconciliation and selection questions. Primary collection can improve a missing domain but still requires valid measurement and follow-up. Report which of these limitations affects the stated use, which evidence supports the chosen inputs, and what remains uncertain.
Worked example
Scenario
A synthetic rollout has four clusters and three periods, with 25 observed participants in every cluster-period. Calculate expected record count; these records are not 300 independent randomized units.
Dataset
Synthetic inputs with units defined in the scenario; no patient data.
| input | value |
|---|---|
| clusters | 4 |
| periods | 3 |
| people_per_cluster_period | 25 |
Steps
Result
There are 300 cluster-period participant records and four randomized clusters. This is a data-layout calculation, not power or treatment-effect estimation.
Trade-offs
Code example
Executed example · Python 3.11.15 · 2026-11-01T02:04:28+00:00
Self-contained synthetic calculation for the worked example only. Inputs and units are listed in the dataset; output is the displayed scalar. This does not fit the full study/model, estimate uncertainty, or select an analysis for a real study.
clusters = 4
periods = 3
people_per_cluster_period = 25
result = clusters*periods*people_per_cluster_period
assert abs(result - 300) < 1e-9
print(result)
Executed example · Rscript (R) version 4.6.1 (2026-06-24) · 2026-11-01T02:04:28+00:00
Self-contained synthetic calculation for the worked example only. Inputs and units are listed in the dataset; output is the displayed scalar. This does not fit the full study/model, estimate uncertainty, or select an analysis for a real study.
clusters <- 4
periods <- 3
people_per_cluster_period <- 25
result <- clusters*periods*people_per_cluster_period
stopifnot(abs(result - 300) < 1e-9)
print(result)
Illustrative example · execution not verified
Self-contained synthetic calculation for the worked example only. Inputs and units are listed in the dataset; output is the displayed scalar. This does not fit the full study/model, estimate uncertainty, or select an analysis for a real study. SAS source is illustrative until executed in a compatible SAS runtime.
data worked_example;
clusters = 4;
periods = 3;
people_per_cluster_period = 25;
result = clusters*periods*people_per_cluster_period;
put result=;
run;