swdpwr: A SAS macro and an R package for power calculations in stepped wedge cluster randomized trials

BACKGROUND AND OBJECTIVE The stepped wedge cluster randomized trial is a study design increasingly used in a wide variety of settings, including public health intervention evaluations, clinical and health service research. Previous studies presenting power calculation methods for stepped wedge designs have focused on continuous outcomes and relied on normal approximations for binary outcomes. These approximations for binary outcomes may or may not be accurate, depending on whether or not the normal approximation to the binomial distribution is reasonable. Although not always accurate, such approximation methods have been widely used for binary outcomes. To improve the approximations for binary outcomes, two new methods for stepped wedge designs (SWDs) of binary outcomes have recently been published. However, these new methods have not been implemented in publicly available software. The objective of this paper is to present power calculation software for SWDs in various settings for both continuous and binary outcomes. METHODS We have developed a SAS macro %swdpwr, an R package swdpwr and a Shiny app for power calculations in SWDs. Different scenarios including cross-sectional and cohort designs, binary and continuous outcomes, marginal and conditional models, three link functions, with and without time effects under exchangeable, nested exchangeable and block exchangeable correlation structures are accommodated in this software. Unequal numbers of clusters per sequence are also allowed. Power calculations for a closed cohort employ a block exchangeable within-cluster correlation structure that accounts for three intracluster (intraclass) correlations: the within-period, between-period, and within-individual correlations. Cross-sectional cohorts allow for nested exchangeable or exchangeable correlation structures defined by the within-period and the between-period intracluster correlations only. Our software assumes a complete design and equal cluster-period sizes. While the methods accommodate correlation structures of constant within-period intracluster correlation coefficient (ICC) as well as a different within- and between-period ICC, it does not allow the between-period ICC to decay. RESULTS swdpwr provides an efficient tool to support investigators in the design and analysis of stepped wedge cluster randomized trials. swdpwr addresses the implementation gap between newly proposed methodology and their application to obtain more accurate power calculations in SWDs. CONCLUSIONS In an effort to make computationally efficient (and non-simulation-based) power methods under both the cross-sectional and closed-cohort designs for continuous and binary outcomes more accessible, we have developed this user-friendly software. swdpwr is implemented under two platforms: SAS and R, satisfying the needs of investigators from various backgrounds. Additionally, the Shiny app enables users who are not able to use SAS or R to implement these methods online straightforwardly.

[1]  C. McCulloch Maximum Likelihood Algorithms for Generalized Linear Mixed Models , 1997 .

[2]  D. Bates,et al.  Mixed-Effects Models in S and S-PLUS , 2001 .

[3]  J. Grimshaw,et al.  Introducing the new CONSORT extension for stepped-wedge cluster randomised trials , 2019, Trials.

[4]  Karla Hemming,et al.  Mixed-effects models for the design and analysis of stepped wedge cluster randomized trials: An overview , 2020, Statistical methods in medical research.

[5]  Valérie Buthion,et al.  ColoNav: patient navigation for colorectal cancer screening in deprived areas – Study protocol , 1999, BMC Cancer.

[6]  M. Segal,et al.  A parametric family of correlation structures for the analysis of longitudinal data. , 1992, Biometrics.

[7]  M. Taljaard,et al.  Sample size calculations for stepped wedge and cluster randomised trials: a unified approach , 2016, Journal of clinical epidemiology.

[8]  Paul Gustafson,et al.  CRTpowerdist: An R package to calculate attained power and construct the power distribution for cross-sectional stepped-wedge and parallel cluster randomized trials , 2021, Comput. Methods Programs Biomed..

[9]  Karla Hemming,et al.  Stepped-wedge cluster randomised controlled trials: a generic framework including parallel and multiple-level designs , 2014, Statistics in medicine.

[10]  Fan Li,et al.  Optimal allocation of clusters in cohort stepped wedge designs , 2018, Statistics & Probability Letters.

[11]  P. Heagerty,et al.  Current issues in the design and analysis of stepped wedge trials. , 2015, Contemporary clinical trials.

[12]  K. Holmes,et al.  Uptake and Population-Level Impact of Expedited Partner Therapy (EPT) on Chlamydia trachomatis and Neisseria gonorrhoeae: The Washington State Community-Level Randomized Trial of EPT , 2015, PLoS medicine.

[13]  Gianluca Baio,et al.  Designing a stepped wedge trial: three main designs, carry-over effects and randomisation approaches , 2015, Trials.

[14]  J. Hughes,et al.  Design and analysis of stepped wedge cluster randomized trials. , 2007, Contemporary clinical trials.

[15]  David M. Murray,et al.  Design and Analysis of Group- Randomized Trials , 1998 .

[16]  S. Zeger,et al.  Longitudinal data analysis using generalized linear models , 1986 .

[17]  P. Alam ‘S’ , 2021, Composites Engineering: An A–Z Guide.

[18]  Bahjat F. Qaqish,et al.  A family of multivariate binary distributions for simulating correlated binary variables with specified marginal means and correlations , 2003 .

[19]  Karla Hemming,et al.  The efficiency of stepped wedge vs. cluster randomized trials: stepped wedge studies do not always require a smaller sample size. , 2013, Journal of clinical epidemiology.

[20]  D. Spiegelman,et al.  Equivalence of conditional and marginal regression models for clustered and longitudinal data , 2004 .

[21]  Steven Teerenstra,et al.  Sample size calculation for stepped wedge and other longitudinal cluster randomised trials , 2016, Statistics in medicine.

[22]  Fan Li,et al.  Review of Recent Methodological Developments in Group-Randomized Trials: Part 1-Design. , 2017, American journal of public health.

[23]  Fan Li,et al.  Sample size determination for GEE analyses of stepped wedge cluster randomized trials , 2018, Biometrics.

[24]  Xiaomei Liao,et al.  "Cross-sectional" stepped wedge designs always reduce the required sample size when there is no time effect. , 2017, Journal of clinical epidemiology.

[25]  John B. Carlin,et al.  The Intra‐Cluster Correlation Coefficient in Cluster Randomized Trials: A Review of Definitions , 2009 .

[26]  N. Breslow,et al.  Approximate inference in generalized linear mixed models , 1993 .

[27]  A. Girling,et al.  Intra-cluster and inter-period correlation coefficients for cross-sectional cluster randomised controlled trials for type-2 diabetes in UK primary care , 2016, Trials.

[28]  P. Alam ‘L’ , 2021, Composites Engineering: An A–Z Guide.

[29]  D. Gerritsen,et al.  Stepped wedge designs could reduce the required sample size in cluster randomized trials. , 2013, Journal of clinical epidemiology.

[30]  Karla Hemming,et al.  A Menu-Driven Facility for Power and Detectable-Difference Calculations in Stepped-Wedge Cluster-Randomized Trials , 2014 .

[31]  Xin Zhou,et al.  A maximum likelihood approach to power calculations for stepped wedge designs of binary outcomes. , 2018, Biostatistics.

[32]  J. Preisser,et al.  Impact of unequal cluster sizes for GEE analyses of stepped wedge cluster randomized trials with binary outcomes , 2021, medRxiv.

[33]  M. Taljaard,et al.  Systematic review finds major deficiencies in sample size methodology and reporting for stepped-wedge cluster randomised trials , 2016, BMJ Open.

[34]  D. Firth,et al.  Estimating Intraclass Correlation for Binary Data , 1999, Biometrics.

[35]  P. Alam ‘E’ , 2021, Composites Engineering: An A–Z Guide.

[36]  D. Spiegelman,et al.  Institutionalizing postpartum intrauterine device (IUD) services in Sri Lanka, Tanzania, and Nepal: study protocol for a cluster-randomized stepped-wedge trial , 2016, BMC Pregnancy and Childbirth.

[37]  Steven Teerenstra,et al.  Sample Size Considerations for GEE Analyses of Three‐Level Cluster Randomized Trials , 2010, Biometrics.

[38]  Karla Hemming,et al.  A tutorial on sample size calculation for multiple-period cluster randomized parallel, cross-over and stepped-wedge trials using the Shiny CRT Calculator , 2020, International journal of epidemiology.

[39]  Gianluca Baio,et al.  Sample size calculation for a stepped wedge trial , 2015, Trials.

[40]  Fan Li Design and analysis considerations for cohort stepped wedge cluster randomized trials with a decay correlation structure , 2019, Statistics in medicine.