powered by
Constructs a matrix of `#cluster` rows and `#timepoint` columns, indicating treatment status in each cluster at each timepoint.
construct_trtMat(Cl, trtDelay, dsntype, timepoints = NULL)
integer (vector), number of clusters per sequence group (in SWD), or number in control and intervention (in parallel designs)
numeric (possibly vector), value(s) between 0 and 1 specifying the intervention effect in the first (second ... ) intervention phase
character, defines the type of design. Options are "SWD", "parallel" and "parallel_baseline", defaults to "SWD".
numeric (scalar or vector), number of timepoints (periods). If design is swd, timepoints defaults to length(Cl)+1. Defaults to 1 for parallel designs.
a matrix trtMat, where rows and columns correspond to cluster and timepoints, respectively
# NOT RUN { construct_trtMat(Cl=c(1,2,1), trtDelay=c(.2,.8), dsntype="SWD") # }
Run the code above in your browser using DataLab