calcPower.Hussey_SWD: Power calculation within stepped wedge design model by Hussey...

Description Usage Arguments Value Examples

Description

Calculation of power for a lmm with cluster as random effect, fixed timepoint effects, but set to null, TP number of timepoints, I number of cluster. The design matrix has to be coded by zeros and ones.

Usage

1
calcPower.Hussey_SWD(ThetaEst, alpha = 0.05, Design, sigmaq, tauq, time)

Arguments

ThetaEst

expected treatment effect

alpha

singificance level (by default 0.05)

Design

design matrix for a given SWD model

sigmaq

within cluster variance

tauq

between cluster variance

time

a logical (FALSE, if no time trends are expected, otherwise TRUE)

Value

Aproximated power of two tailed test, although the design matrix is fractionated, then power is not valid #@references Hussey2007

Examples

1
2
3
4
5
6
7
8
noCl<-10
noT<-6
switches<-2
DM<-designMatrix.SWD(noCl,noT,switches)
sigma.e <- 2
sigma.alpha <- 2    
calcPower.Hussey_SWD(ThetaEst=1,Design=DM, sigmaq=sigma.e^2, tauq=sigma.alpha^2, time=FALSE)
calcPower.Hussey_SWD(ThetaEst=1,Design=v, sigmaq=sigma.e^2, tauq=sigma.alpha^2, time=TRUE)

trutscheld/SWDsampling documentation built on June 1, 2019, 1:52 a.m.