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.
outcomeModel_cfg object indicating how outcome models should be estimated.
treatmentModel_cfg object indicating how the propensity score
model should be estimated.
effectModel_cfg object indicating how the joint effect model
should be estimated.
qoiQoI_cfg object 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.
new()Create a new HTE_cfg object with all necessary information about how
to carry out an HTE analysis.
HTE_cfg$new(
outcome = NULL,
treatment = NULL,
effect = NULL,
qoi = NULL,
verbose = FALSE
)outcomeModel_cfg object indicating how outcome models should
be estimated.
treatmentModel_cfg object indicating how the propensity score
model should be estimated.
effectModel_cfg object indicating how the joint effect model
should be estimated.
qoiQoI_cfg object 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.
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 `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"))
)
#> Super Learner
#> Version: 2.0-29
#> Package created on 2024-02-06
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)
#> <HTE_cfg>
#> Public:
#> clone: function (deep = FALSE)
#> effect: SLEnsemble_cfg, Model_cfg, R6
#> initialize: function (outcome = NULL, treatment = NULL, effect = NULL, qoi = NULL,
#> outcome: SLEnsemble_cfg, Model_cfg, R6
#> qoi: QoI_cfg, R6
#> treatment: SLEnsemble_cfg, Model_cfg, R6
#> verbose: FALSE