| HTE_cfg {tidyhte} | R Documentation |
Configuration of Quantities of Interest
Description
HTE_cfg is a configuration class that pulls everything together, indicating
the full configuration for a given HTE analysis. This includes how to estimate
models and what Quantities of Interest to calculate based off those underlying models.
Public fields
outcomeModel_cfgobject indicating how outcome models should be estimated.treatmentModel_cfgobject indicating how the propensity score model should be estimated.effectModel_cfgobject indicating how the joint effect model should be estimated.qoiQoI_cfgobject indicating what the Quantities of Interest are and providing all necessary detail on how they should be estimated.verboseLogical indicating whether to print debugging information.
Methods
Public methods
Method new()
Create a new HTE_cfg object with all necessary information about how
to carry out an HTE analysis.
Usage
HTE_cfg$new( outcome = NULL, treatment = NULL, effect = NULL, qoi = NULL, verbose = FALSE )
Arguments
outcomeModel_cfgobject indicating how outcome models should be estimated.treatmentModel_cfgobject indicating how the propensity score model should be estimated.effectModel_cfgobject indicating how the joint effect model should be estimated.qoiQoI_cfgobject indicating what the Quantities of Interest are and providing all necessary detail on how they should be estimated.verboseLogical indicating whether to print debugging information.
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 <- QoI_cfg$new(
mcate = mcate_cfg,
pcate = pcate_cfg,
vimp = vimp_cfg,
diag = diag_cfg
)
ps_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
y_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
fx_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
HTE_cfg$new(outcome = y_cfg, treatment = ps_cfg, effect = fx_cfg, qoi = qoi_cfg)
Method clone()
The objects of this class are cloneable with this method.
Usage
HTE_cfg$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.
Examples
## ------------------------------------------------
## Method `HTE_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 <- QoI_cfg$new(
mcate = mcate_cfg,
pcate = pcate_cfg,
vimp = vimp_cfg,
diag = diag_cfg
)
ps_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
y_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
fx_cfg <- SLEnsemble_cfg$new(
learner_cfgs = list(SLLearner_cfg$new("SL.glm"), SLLearner_cfg$new("SL.gam"))
)
HTE_cfg$new(outcome = y_cfg, treatment = ps_cfg, effect = fx_cfg, qoi = qoi_cfg)