This adds a definition about how to display a moderators to the MCATE config. A moderator is any variable that you want to view information about CATEs with respect to.

add_moderator(hte_cfg, model_type, ..., .model_arguments = NULL)

Arguments

hte_cfg

HTE_cfg object to update.

model_type

Character indicating the model type for these moderators. Currently two model types are supported: "Stratified" for discrete moderators and "KernelSmooth" for continuous ones.

...

The (unquoted) names of the moderator variables.

.model_arguments

A named list from argument name to value to pass into the constructor for the model. See Stratified_cfg and KernelSmooth_cfg for more details.

Value

Updated HTE_cfg object

Examples

library("dplyr")
basic_config() %>%
   add_moderator("Stratified", x2, x3) %>%
   add_moderator("KernelSmooth", x1, x4, x5) -> hte_cfg