construct_incompMat: Constructs a matrix of 'NA' and '1' for unobserved and...

View source: R/construct_DesMat.R

construct_incompMatR 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


SteppedPower documentation built on Sept. 13, 2023, 1:07 a.m.