Related Experiment Video
Updated: Oct 12, 2025

Inverse Probability of Treatment Weighting Propensity Score using the Military Health System Data Repository and National Death Index
Published on: January 8, 2020
swdpwr: A SAS macro and an R package for power calculations in stepped wedge cluster randomized trials
Jiachen Chen1, Xin Zhou2, Fan Li2
1Department of Biostatistics, Yale University School of Public Health, New Haven, CT 06511, United States; Department of Biostatistics, Boston Unversity School of Public Health, Boston, MA 02118, United States.
This study introduces user-friendly software for accurate power calculations in stepped wedge cluster randomized trials (SWDs). The new tools support both continuous and binary outcomes, improving upon previous approximations for stepped wedge designs.
Area of Science:
- Biostatistics
- Clinical Trials Methodology
- Public Health Research
Background:
- Stepped wedge cluster randomized trials (SWDs) are increasingly utilized in public health and clinical research.
- Existing power calculation methods for SWDs often rely on normal approximations for binary outcomes, which may lack accuracy.
- Newly developed methods for binary outcomes in SWDs lack accessible software implementation.
Purpose of the Study:
- To present user-friendly software for power calculations in stepped wedge cluster randomized trials (SWDs).
- To accommodate various settings, including continuous and binary outcomes, different designs, and correlation structures.
- To bridge the gap between advanced statistical methods and practical application in SWD design.
Main Methods:
- Development of a SAS macro (%swdpwr), an R package (swdpwr), and a Shiny application for power calculations.
- The software supports cross-sectional and cohort designs, binary and continuous outcomes, and various correlation structures (exchangeable, nested exchangeable, block exchangeable).
- Accommodates marginal and conditional models, different link functions, time effects, and unequal cluster numbers per sequence.
Main Results:
- The developed software, swdpwr, offers an efficient tool for designing and analyzing SWDs.
- It addresses the need for more accurate power calculations by implementing recent methodological advancements.
- Provides accessible power calculation tools for investigators conducting SWDs.
Conclusions:
- User-friendly software (SAS macro, R package, Shiny app) has been developed for power calculations in SWDs.
- The software makes computationally efficient, non-simulation-based power methods accessible for continuous and binary outcomes.
- Caters to diverse user needs, including those without SAS/R expertise via the online Shiny app.
Related Concept Videos
Parametric Survival Analysis: Weibull and Exponential Methods
Weibull Distribution
The Weibull distribution is a flexible model used in parametric survival analysis. It can handle both increasing and decreasing hazard rates, depending on its shape parameter...
Statistical Analysis System (SAS)
Applications: SAS finds applications in numerous fields, including healthcare for clinical trial analysis, finance for risk assessment, marketing for customer data analysis, and...
Comparing the Survival Analysis of Two or More Groups
Statistical Software for Data Analysis and Clinical Trials
Introduction To Survival Analysis
The primary goal of survival analysis is to estimate survival time—the time...
Study Design in Statistics
Does aspirin reduce the risk of heart attacks? Is one brand of fertilizer more effective at growing roses than another? Is fatigue as dangerous to a driver as the influence of alcohol? Questions like these are answered using randomized experiments with proper...

