designMatrix {samplingDataCRT} | R Documentation |
Design matrix for SWD model
Description
create design matrix for a given setup of a stepped wedge design
Usage
designMatrix(nC, nT, nSw, swP = NULL, design = "SWD")
Arguments
nC |
number of cluster |
nT |
number of timepoints |
nSw |
number of cluster : within parallel recieve the control (nC-nSw receive the intervention), within cross-over recieve the pattern (0, 1) (nC-nSw receive the pattern (1,0)) for nearly the same number of time points, within SWD switches from control to intervention per time point |
swP |
is the time point the cluster cross over the condition in a cross over study, if not given then it is nearly half of the time past |
design |
is the study type (parallel, cross-sectional, stepped wedge) |
Value
design matrix for a given setup of a stepped wedge design
Examples
designMatrix(5,6,1)
K<-6 #measurement (or timepoints)
I<-10 #Cluster
designMatrix(nC=I, nT=K, nSw=2)
[Package samplingDataCRT version 1.0 Index]