Compute the power of a stepped wedge cluster randomized trial design with a continuous outcome,
or determine parameters to obtain a target power.
Exactly one of alpha
, power
, nclusters
, nsubjects
,
ntimes
, d
, ICC
, rho_c
, rho_s
, and vart
must be passed as NA
. Note that alpha
andpower
have non-NA
defaults, so if those are the parameters of
interest they must be explicitly passed as NA
.
The stepped wedge model assumed by Hooper et al (2016) is given below:
y_itjk = + _t + X_it + c_ij + (ct)_itj + s_ijk + e_itjk
where y_itjk is the outcome for individual k in cluster j of arm i
at time t. Fixed effects include the overall mean and effects for time _t.
The vector X_it is 1 if arm i at time t is undergoing the intervention, 0
otherwise. The terms c_ij, (ct)_itj, s_ijk, and e_itjk correspond
to the time invariant cluster random effect, the time-varying cluster random effect,
the time invariant subject random effect, and the time-varying subject random effect respectively.
Random effects are assumed to be independent and Normally distributed with mean 0 and variances
_C^2, _CT^2, _S^2, and _E^2, respectively.
The total variance of the outcome ^2 is given by
^2 = _C^2 + _CT^2 + _S^2 + _E^2
Let , , and be the intracluster correlation, cluster autocorrelation,
and subject autocorrelation, respectively. These parameters are given as follows:
= _C^2 + _CT^2_C^2 + _CT^2 + _S^2 + _E^2
_C = _C^2_C^2 + _CT^2
_S = _S^2_S^2 + _E^2
When _S = 0 the design is considered to be a cross-sectional design, with new individuals
observed at each time point. When _S > 0 the design is a closed cohort, with repeated measurements
on the same individuals at each time point.