designMatrix: Design matrix for SWD model

Description Usage Arguments Value Examples

View source: R/designMatrix.R

Description

create design matrix for a given setup of a stepped wedge design

Usage

1
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

1
2
3
4
5
designMatrix(5,6,1)

K<-6  #measurement (or timepoints)
I<-10 #Cluster
designMatrix(nC=I, nT=K, nSw=2)

samplingDataCRT documentation built on May 2, 2019, 9:25 a.m.