VarClosed_Li {SteppedPower} | R Documentation |
Closed formula for treatment variance, with proportional decay
Description
From Li et al "Design and analysis considerations for cohort stepped wedge cluster randomized trials with a decay correlation structure"
Usage
VarClosed_Li(trtMat, tau, psi, N, AR)
Arguments
trtMat |
a matrix trtMat to define treatment allocation, where rows and columns correspond to cluster and timepoints, respectively |
tau |
numeric, standard deviation of random intercepts |
psi |
numeric, random subject specific intercept. |
N |
numeric, number of individuals per cluster. |
AR |
numeric (scalar), It defines the AR(1)-correlation of random effects. |
Value
numeric, variance of the estimator for treatment effect
Examples
## test setting, from Hussey&Hughes 2007 ####
trtMat <- construct_DesMat(c(6,6,6,6))$trtMat
tau <- .025 ; N <- 100 ; psi <- .1 ; AR <- .6
tmp <- VarClosed_Li(trtMat, tau=tau, psi=psi, N=N, AR=AR)
tTestPwr((.05-.032), se=sqrt(tmp), Inf)
glsPower(Cl=rep(6,4), mu0=.05, mu1=.032, AR=AR,
tau=tau, N=N, sigma=0, psi=psi, verbose=0)
[Package SteppedPower version 0.3.5 Index]