Skip to contents

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


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_learner

A sl3 learner object inheriting from Lrnr_base that specifies the base supervised learning algorithm used by the meta-learner.

stratify_by_treatment

Logical 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_regression

Logical indicating whether to regress the first-stage contrast estimates onto the modifier set. This defaults to TRUE. Setting it to FALSE is only supported when the modifier set and confounder set are the same.


Method get_pseudo_data()

Usage

Lrnr_cate_T$get_pseudo_data(hte3_task, ...)


Method make_metalearner_task()

Usage

Lrnr_cate_T$make_metalearner_task(hte3_task, train = TRUE)


Method clone()

The objects of this class are cloneable with this method.

Usage

Lrnr_cate_T$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.