SwCRTdesign: An RPackage for Stepped Wedge Trial Design and Analysis. (November 2020) - Voldal, Emily C.; Hakhu, Navneet R.; Xia, Fan; Heagerty, Patrick J.; Hughes, James P.
Highlights: We introduce an R package 'swCRTdesign' for stepped wedge trials (SWTs). Uses a random effects model. Can calculate power, simulate data, and create summaries and plots. Supplemental interface makes features accessible to researchers unfamiliar with R. Provides researchers with convenient and flexible tools for working with SWTs. 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 R package 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.