View source: R/construct_DesMat.R
construct_trtMat | R Documentation |
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)
Cl |
integer (vector), number of clusters per sequence group (in SWD), or number in control and intervention (in parallel designs) |
trtDelay |
numeric (possibly vector), |
dsntype |
character, defines the type of design. Options are "SWD", "parallel" and "parallel_baseline", defaults to "SWD". |
timepoints |
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
construct_trtMat(Cl=c(1,2,1), trtDelay=c(.2,.8), dsntype="SWD")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.