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
mcate
A configuration object of type
MCATE_cfg
of marginal effects to calculate.pcate
A configuration object of type
PCATE_cfg
of partial effects to calculate.vimp
A configuration object of type
VIMP_cfg
of variable importance to calculate.diag
A configuration object of type
Diagnostics_cfg
of model diagnostics to calculate.ate
Logical flag indicating whether an estimate of the ATE should be returned.
predictions
Logical 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
mcate
A configuration object of type
MCATE_cfg
of marginal effects to calculate.pcate
A configuration object of type
PCATE_cfg
of partial effects to calculate.vimp
A configuration object of type
VIMP_cfg
of variable importance to calculate.diag
A configuration object of type
Diagnostics_cfg
of model diagnostics to calculate.ate
A logical flag for whether to calculate the Average Treatment Effect (ATE) or not.
predictions
A 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
deep
Whether 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
)