Description Usage Arguments Value Author(s) References Examples
This function uses the SWSamp
package by Gianluca Baio for
estimating power based on analytic formula of Hussey and
Hughes (2007) where sample size calculations are based on
an assumption of a normally-distributed outcome.
1 2 3 4 5 6 7 8 9 10 11 12 | cpa.sw.count(
lambda1,
RR,
nclusters,
steps,
nsubjects,
ICC = 0.01,
alpha = 0.05,
which.var = "within",
X = NULL,
all.returned.objects = FALSE
)
|
lambda1 |
Baseline rate for outcome of interest |
RR |
Estimated relative risk of the intervention |
nclusters |
Number of clusters |
steps |
Number of time steps. Baseline is assumed. |
nsubjects |
Average size of each cluster |
ICC |
Intra-class correlation coefficient (default = 0.01) |
alpha |
Significance level (default=0.05) |
which.var |
String character specifying which variance to report.
Options are the default value |
X |
A design matrix indicating the time at which each of the clusters should switch to the intervention arm. Default is NULL and this matrix is automatically computed, but can it can be passed as a user-defined matrix with (nclusters) rows and (steps + 1) columns. |
all.returned.objects |
Logical. Default = FALSE, indicating that only the estimated power should be returned. When TRUE, all objects (listed below) are returned. |
power |
The resulting power |
When all.returned.objects = TRUE, returned items also include:
sigma.y |
The estimated total (marginal) sd for the outcome |
sigma.e |
The estimated residual sd |
sigma.a |
The resulting cluster-level sd |
setting |
A list including the following values: - n.clusters = The number of clusters (nclusters) - n.time.points = The number of steps in the SW design (steps) - avg.cluster.size = The average cluster size (nsubjects) - design.matrix = The design matrix for the SWT under consideration |
Alexandria C. Sakrejda (acbro0@umass.edu)
Ken Kleinman (ken.kleinman@gmail.com)
Baio, G; Copas, A; Ambler, G; Hargreaves, J; Beard, E; and Omar, RZ Sample size calculation for a stepped wedge trial. Trials, 16:354. Aug 2015.
Hussey M and Hughes J. Design and analysis of stepped wedge cluster randomized trials. Contemporary Clinical Trials. 28(2):182-91. Epub 2006 Jul 7. Feb 2007
1 | cpa.sw.count(lambda1 = 1.75, RR = 0.9, nclusters = 21, steps = 6, nsubjects = 30, ICC = 0.01)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.