construct_incompMat {SteppedPower} | R Documentation |
Constructs a matrix of 'NA' and '1' for unobserved and observed cluster periods, respectively.
Description
Mostly useful to build incomplete stepped wedge designs
Usage
construct_incompMat(incomplete, dsntype, timepoints, Cl, trtmatrix = NULL)
Arguments
incomplete |
integer, either a scalar (only for SWD) or a matrix. A vector defines the number of periods before and after the switch from control to intervention that are observed. A matrix consists of '1's for observed clusterperiods and '0's or 'NA' for unobserved clusterperiods. |
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. |
Cl |
integer (vector), number of clusters per sequence group (in SWD), or number in control and intervention (in parallel designs) |
trtmatrix |
an optional user defined matrix to define treatment allocation |
Value
a matrix