| MCATE_cfg {tidyhte} | R Documentation |
Configuration of Marginal CATEs
Description
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.
Public fields
cfgsNamed list of covariates names to a
Model_cfgobject defining how to present that covariate's CATE surface (while marginalizing over all other covariates).std_errorsBoolean indicating whether the results should be returned with standard errors or not.
estimandString indicating the estimand to target.
Methods
Public methods
Method new()
Create a new MCATE_cfg object with specified model name and hyperparameters.
Usage
MCATE_cfg$new(cfgs, std_errors = TRUE)
Arguments
cfgsNamed list from moderator name to a
Model_cfgobject defining how to present that covariate's CATE surface (while marginalizing over all other covariates)std_errorsBoolean indicating whether the results should be returned with standard errors or not.
Returns
A new MCATE_cfg object.
Examples
MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
Method add_moderator()
Add a moderator to the MCATE_cfg object. This entails defining a configuration
for displaying the effect surface for that moderator.
Usage
MCATE_cfg$add_moderator(var_name, cfg)
Arguments
var_nameThe name of the moderator to add (and the name of the column in the dataset).
cfgA
Model_cfgdefining how to display the selected moderator's effect surface.
Returns
An updated MCATE_cfg object.
Examples
cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
cfg <- cfg$add_moderator("x2", KernelSmooth_cfg$new(neval = 100))
Method clone()
The objects of this class are cloneable with this method.
Usage
MCATE_cfg$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
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))