MCATE_cfg
is a configuration class for estimating marginal response
surfaces based on heterogeneous treatment effect estimates. "Marginal"
in this context implies that all other covariates are marginalized.
Thus, if two covariates are highly correlated, it is likely that their
MCATE surfaces will be extremely similar.
cfgs
Named list of covariates names to a Model_cfg
object defining
how to present that covariate's CATE surface (while marginalizing
over all other covariates).
std_errors
Boolean indicating whether the results should be returned with standard errors or not.
estimand
String indicating the estimand to target.
new()
Create a new MCATE_cfg
object with specified model name and hyperparameters.
MCATE_cfg$new(cfgs, std_errors = TRUE)
cfgs
Named list from moderator name to a Model_cfg
object
defining how to present that covariate's CATE surface (while
marginalizing over all other covariates)
std_errors
Boolean indicating whether the results should be returned with standard errors or not.
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
add_moderator()
Add a moderator to the MCATE_cfg
object. This entails defining a configuration
for displaying the effect surface for that moderator.
var_name
The name of the moderator to add (and the name of the column in the dataset).
cfg
A Model_cfg
defining how to display the selected moderator's effect
surface.
cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
cfg <- cfg$add_moderator("x2", KernelSmooth_cfg$new(neval = 100))
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
#> <MCATE_cfg>
#> Public:
#> add_moderator: function (var_name, cfg)
#> cfgs: list
#> clone: function (deep = FALSE)
#> estimand: MCATE
#> initialize: function (cfgs, std_errors = TRUE)
#> std_errors: TRUE
## ------------------------------------------------
## Method `MCATE_cfg$new`
## ------------------------------------------------
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
#> <MCATE_cfg>
#> Public:
#> add_moderator: function (var_name, cfg)
#> cfgs: list
#> clone: function (deep = FALSE)
#> estimand: MCATE
#> initialize: function (cfgs, std_errors = TRUE)
#> std_errors: TRUE
## ------------------------------------------------
## Method `MCATE_cfg$add_moderator`
## ------------------------------------------------
cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
cfg <- cfg$add_moderator("x2", KernelSmooth_cfg$new(neval = 100))