design_matrix_ABk: design_matrix_ABk

Description Usage Arguments Value Examples

Description

construct design matrix for given a given case with k complete baseline-treatment phases.

Usage

1
design_matrix_ABk(trt_vec, k, treatment_name = "TREATMENT")

Arguments

trt_vec

character vector indicating sub-phase of a particular case, e.g. c("BASELINE", "BASELINE", "TREATMENT", "TREATMENT")

k

number of complete sub-phase cycles, as in (AB)^k

treatment_name

string indicating name of the treatment sub-phase as recorded in df.

Value

a (N_i, 4k)-dimension design matrix

Examples

1
X_1 <- design_matrix_ABk(sim_df[sim_df$case == 1, "treatment"], k = 2)

fineiskid/scdlintrend documentation built on May 16, 2019, 12:53 p.m.