This class constructs a T-learner (or S-learner) for estimation of the conditional average treatment effect (CATE)
Format
An R6 class with public methods to initialize the learner, create a regression task, and access the base learner.
Details
The learner first estimates outcome regressions as functions of the
adjustment set W. By default, it then regresses the resulting
first-stage contrast tau(W) onto the modifier set V. When
stratify_by_treatment = FALSE, the first-stage outcome model is fit as
a pooled S-learner-style regression and evaluated counterfactually under each
treatment level.
Super classes
sl3::Lrnr_base -> hte3::Lrnr_hte -> Lrnr_cate_T
Methods
Inherited methods
sl3::Lrnr_base$assert_trained()sl3::Lrnr_base$base_chain()sl3::Lrnr_base$base_predict()sl3::Lrnr_base$base_train()sl3::Lrnr_base$chain()sl3::Lrnr_base$custom_chain()sl3::Lrnr_base$get_outcome_range()sl3::Lrnr_base$get_outcome_type()sl3::Lrnr_base$predict()sl3::Lrnr_base$predict_fold()sl3::Lrnr_base$print()sl3::Lrnr_base$process_formula()sl3::Lrnr_base$reparameterize()sl3::Lrnr_base$retrain()sl3::Lrnr_base$sample()sl3::Lrnr_base$set_train()sl3::Lrnr_base$subset_covariates()sl3::Lrnr_base$train()sl3::Lrnr_base$train_sublearners()hte3::Lrnr_hte$check_treatment_type()hte3::Lrnr_hte$get_modifiers()
Method new()
Usage
Lrnr_cate_T$new(
base_learner,
treatment_level = 1,
control_level = 0,
stratify_by_treatment = TRUE,
second_stage_regression = TRUE,
...
)Arguments
base_learnerA
sl3learner object inheriting fromLrnr_basethat specifies the base supervised learning algorithm used by the meta-learner.stratify_by_treatmentLogical indicating whether to estimate outcome regression separately in each treatment arm (i.e., T-learner) or pooled across treatment arms (i.e., S-learner).
second_stage_regressionLogical indicating whether to regress the first-stage contrast estimates onto the modifier set. This defaults to
TRUE. Setting it toFALSEis only supported when the modifier set and confounder set are the same.