preprocess {bonsaiforest} | R Documentation |
Data Preprocessing
Description
Function to preprocess the data and obtain the design matrices corresponding to a model with just interaction of the covariates with the treatment, to a model with just the main effects and to a model just with the covariates and one-hot encoding.
Usage
preprocess(trt, subgr, covars, data)
Arguments
trt |
( |
subgr |
( |
covars |
( |
data |
( |
Value
List with design_ia
, design_main
, design_dummy
, subgr_names
.
Examples
preprocess("arm", c("x_1", "x_2"), c("x_1", "x_2", "x_3"), example_data)