swCRTdesign: An RPackage for Stepped Wedge Trial Design and Analysis

Comput Methods Programs Biomed. 2020 Nov:196:105514. doi: 10.1016/j.cmpb.2020.105514. Epub 2020 May 21.

Abstract

Background and objective: Stepped wedge trials (SWTs) are a type of cluster-randomized trial that are commonly used to evaluate health care interventions. Most SWT-related software packages have restrictive assumptions about the study design and correlation structure of the data. The objective of this paper is to present a package and corresponding web-based graphical user interface (GUI) that provide researchers with another, more flexible option for SWT design and analysis.

Methods: We developed an Rpackage swCRTdesign ('stepped wedge Cluster Randomized Trial design'), which uses a random effects model to account for correlation in the data induced by a SWT design. Possible sources of correlation include clusters, time within clusters, and treatment within clusters.

Results: swCRTdesign allows a user to calculate power, simulate SWT data to streamline simulation studies (e.g. to estimate power), and create descriptive summaries and plots. Additionally, a GUI, developed using shiny, is available to calculate power and create power curves and design plots.

Conclusions: The swCRTdesign package accommodates a wide variety of SWT designs, and makes it easy to account for some sources of correlation which are not found in other packages. The user-friendly web-based GUI makes some swCRTdesign features accessible to researchers not familiar with R. These two resources will make appropriately complex SWT calculations more accessible to scientists from a wide variety of backgrounds.

Keywords: Cluster randomized trial; R; Shiny; Stepped wedge trial.

MeSH terms

  • Computer Simulation
  • Research Design*
  • Software*