Skip to contents

Given a design of a hypothetical cluster parallel randomized study and their pattern of fidelity over time conduct the function the corresponding design matrix which can be used for linear regression modeling

Usage

implemMatrix.parallel(nC, nT, nSw, pattern)

Arguments

nC

Number of cluster

nT

Number of time points

nSw

Number of cluster with control condition 0 (nC-nSw is then the number of cluster with treatment condition 1)

pattern

Fidelity pattern (deviation from 1) for each time point

Value

Design matrix of size nT x nC for a parrallel cluster randomized trial with values of 0 for control condition and values between 0 and 1 for degree of implementation of treatment (fidelity)