Description Usage Arguments Value Examples
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.
1 | calcPower.Hussey_SWD(ThetaEst, alpha = 0.05, Design, sigmaq, tauq, time)
|
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) |
Aproximated power of two tailed test, although the design matrix is fractionated, then power is not valid #@references Hussey2007
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.