ResearchInternational Journal of Epidemiology · May 14, 2026
A tutorial on conducting sample size and power calculations for detecting treatment effect heterogeneity in cluster randomized trials with linear mixed models
Ryan Baumann M, Taljaard M, Heagerty PJ, Harhay MO, Tong G, Wang R, et al
Abstract
Cluster-randomized trials (CRTs) are a well-established class of designs for evaluating community-based interventions. An essential task in planning these trials is determining the number of clusters and cluster sizes needed to achieve sufficient statistical power for detecting a clinically relevant effect size. While methods for evaluating the average treatment effect (ATE) for the entire study population are well-established, sample size methods for testing heterogeneity of treatment effects (HTEs), i.e. treatment-covariate interaction or difference in subpopulation-specific treatment effects, in CRTs have only recently been developed. For pre-specified analyses of HTEs in CRTs, effect-modifying covariates should, ideally, be accompanied by sample size or power calculations to ensure the trial has adequate power for the planned analyses. Power analysis for testing HTEs is more complex than for ATEs due to the additional design parameters that must be specified. Power and sample size formulas for testing HTEs via linear mixed-effects models have been separately derived for different cluster-randomized designs, including single and multi-period parallel designs, crossover designs, and stepped-wedge designs, and for continuous and binary outcomes. This tutorial provides a consolidated reference guide for these methods and enhances their accessibility through an online R Shiny Calculator. We further discuss key considerations for conducting sample size and power calculations to test pre-specified HTE hypotheses in CRTs, highlighting the importance of specifying advanced estimates of intracluster correlation coefficients for both outcomes and covariates and their implications for power. The sample size methodology and calculator functionality are demonstrated through a real CRT example.
Topics
Sample Size; Humans; Randomized Controlled Trials as Topic; Treatment Effect Heterogeneity; Linear Models; Research Design; Cluster Analysis
DOI: 10.1093/ije/dyag069 · PubMed: 42128524
Spotted a mistake? Suggest a correction
More in Public & Global Health
Interventions to reduce paediatric cancer treatment abandonment in low-income and middle-income countries: a systematic review and meta-analysis
ResearchLancet Glob Health · Nov 23, 2026 · Public & Global Health
Prevalence of neural tube defects and major external structural abnormalities by antiretroviral treatment regimen in Botswana in 2014-22: a birth outcomes surveillance study
ResearchLancet Glob Health · Nov 23, 2026 · Public & Global Health
2022 WHO estimates for overall and human papillomavirus test-based cervical cancer screening coverage worldwide: a review and synthetic analysis
ResearchLancet Glob Health · Nov 23, 2026 · Public & Global Health
Mortality and disability after hospitalisation for injuries in low-income and middle-income countries: a cohort study
ResearchLancet Glob Health · Nov 18, 2026 · Public & Global Health
Progress towards the elimination of transmission of Trypanosoma brucei gambiense in the Democratic Republic of the Congo: a 25-year spatiotemporal analysis of national surveillance data