MCATE_cfg | R Documentation |
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.
A new MCATE_cfg
object.
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.
MCATE_cfg$add_moderator(var_name, cfg)
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.
An updated MCATE_cfg
object.
cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100))) cfg <- cfg$add_moderator("x2", KernelSmooth_cfg$new(neval = 100))
clone()
The objects of this class are cloneable with this method.
MCATE_cfg$clone(deep = FALSE)
deep
Whether to make a deep clone.
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
## ------------------------------------------------
## Method `MCATE_cfg$new`
## ------------------------------------------------
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
## ------------------------------------------------
## 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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.