| QoI_cfg {tidyhte} | R Documentation |
Configuration of Quantities of Interest
Description
QoI_cfg is a configuration class for the Quantities of Interest to be
generated by the HTE analysis.
Public fields
mcateA configuration object of type
MCATE_cfgof marginal effects to calculate.pcateA configuration object of type
PCATE_cfgof partial effects to calculate.vimpA configuration object of type
VIMP_cfgof variable importance to calculate.diagA configuration object of type
Diagnostics_cfgof model diagnostics to calculate.ateLogical flag indicating whether an estimate of the ATE should be returned.
predictionsLogical flag indicating whether estimates of the CATE for every unit should be returned.
Methods
Public methods
Method new()
Create a new QoI_cfg object with specified Quantities of Interest
to estimate.
Usage
QoI_cfg$new( mcate = NULL, pcate = NULL, vimp = NULL, diag = NULL, ate = TRUE, predictions = FALSE )
Arguments
mcateA configuration object of type
MCATE_cfgof marginal effects to calculate.pcateA configuration object of type
PCATE_cfgof partial effects to calculate.vimpA configuration object of type
VIMP_cfgof variable importance to calculate.diagA configuration object of type
Diagnostics_cfgof model diagnostics to calculate.ateA logical flag for whether to calculate the Average Treatment Effect (ATE) or not.
predictionsA logical flag for whether to return predictions of the CATE for every unit or not.
Returns
A new Diagnostics_cfg object.
Examples
mcate_cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
pcate_cfg <- PCATE_cfg$new(
cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)),
model_covariates = c("x1", "x2", "x3"),
num_mc_samples = list(x1 = 100)
)
vimp_cfg <- VIMP_cfg$new()
diag_cfg <- Diagnostics_cfg$new(
outcome = c("SL_risk", "SL_coefs", "MSE"),
ps = c("SL_risk", "SL_coefs", "AUC")
)
QoI_cfg$new(
mcate = mcate_cfg,
pcate = pcate_cfg,
vimp = vimp_cfg,
diag = diag_cfg
)
Method clone()
The objects of this class are cloneable with this method.
Usage
QoI_cfg$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
mcate_cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
pcate_cfg <- PCATE_cfg$new(
cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)),
model_covariates = c("x1", "x2", "x3"),
num_mc_samples = list(x1 = 100)
)
vimp_cfg <- VIMP_cfg$new()
diag_cfg <- Diagnostics_cfg$new(
outcome = c("SL_risk", "SL_coefs", "MSE"),
ps = c("SL_risk", "SL_coefs", "AUC")
)
QoI_cfg$new(
mcate = mcate_cfg,
pcate = pcate_cfg,
vimp = vimp_cfg,
diag = diag_cfg
)
## ------------------------------------------------
## Method `QoI_cfg$new`
## ------------------------------------------------
mcate_cfg <- MCATE_cfg$new(cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)))
pcate_cfg <- PCATE_cfg$new(
cfgs = list(x1 = KernelSmooth_cfg$new(neval = 100)),
model_covariates = c("x1", "x2", "x3"),
num_mc_samples = list(x1 = 100)
)
vimp_cfg <- VIMP_cfg$new()
diag_cfg <- Diagnostics_cfg$new(
outcome = c("SL_risk", "SL_coefs", "MSE"),
ps = c("SL_risk", "SL_coefs", "AUC")
)
QoI_cfg$new(
mcate = mcate_cfg,
pcate = pcate_cfg,
vimp = vimp_cfg,
diag = diag_cfg
)