This package includes functions for the design and analysis of stepped wedge cluster randomized trials according to a repeated cross-sectional sampling scheme. Four primary functions -
swPlot - and two support functions -
swDsn - are included. The
blkDiag function creates a block diagonal matrix from a specified array or list of block-matrices. The
swDsn function creates a stepped wedge (SW) design object based on specified information on clusters, time points, and the two arms of the cluster randomized trial (CRT). The
swPwr function computes the (two-sided) power of treatment effect (θ) for the specified SW CRT design via weighted least squares (WLS), where the response/outcome of interest is assumed to come from a mixed effects model with random time effects and (possibly correlated) random intercepts and random treatment effects. The random time effects apply to all time points, and time is treated as categorical. The
swSim function generates individual-level data consisting of response, treatment, time, and cluster variables based on a specified SW CRT design. The
swSummary function computes the mean, sum, or number of non-missing response values for clusters separately or aggregated by wave at each time point from stepped wedge data that includes, at least, response, treatment, time, and cluster variables. The
swPlot function plots mean response as a combined or separate plot, for waves and clusters. Some features of the package are also available as a shiny app, available online (https://swcrtdesign.shinyapps.io/stepped_wedge_power_calculation/) or to download and run locally (https://github.com/swCRTdesign/Stepped-wedge-power-calculation).
|License:||GPL (>= 2)|
James P Hughes, Navneet R Hakhu, and Emily C Voldal
Maintainer: James P Hughes <email@example.com>
Hussey MA, Hughes JP. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials 2007;28:182-191.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.