The X-Learner (Künzel et al., 2019) proceeds in three stages:
Fit group-specific outcome models \(\hat\mu_0(x)\) and \(\hat\mu_1(x)\) as in the T-Learner.
Impute individual treatment effects, \(D_0 = \hat\mu_1(X_0) - Y_0\) for controls and \(D_1 = Y_1 - \hat\mu_0(X_1)\) for the treated, and regress them on the covariates to obtain \(\hat\tau_0(x)\) and \(\hat\tau_1(x)\).
Combine the two estimates with propensity score weights: $$\hat\tau(x) = \hat e(x) \hat\tau_0(x) + (1 - \hat e(x)) \hat\tau_1(x)$$
x_learner(
data,
outcome = "y",
treatment = "t",
learner,
ps_learner,
tau_learner = NULL,
covariates = NULL
)
# S3 method for class 'x_learner'
predict(object, newdata, ...)A data.frame with the outcome, treatment and covariates.
Name of the outcome column. Default "y".
Name of the binary (0/1) treatment column. Default "t".
An mlr3 regression learner for the stage-1 outcome models.
An mlr3 classification learner for the propensity score
model, e.g. mlr3::lrn("classif.log_reg").
Optional mlr3 regression learner for the stage-2
imputed-effect models. Defaults to a clone of learner.
Optional character vector of covariate columns. Defaults to all columns except the outcome and the treatment.
A fitted x_learner model.
A data.frame containing at least the covariate columns.
Ignored.
A fitted CATE model of class c("x_learner", "cate_learner");
see s_learner().
The X-Learner is particularly effective when the treated and control groups are of very different sizes.
predict(x_learner): Predict CATEs for new data.
Künzel, S. R., Sekhon, J. S., Bickel, P. J., & Yu, B. (2019). Metalearners for estimating heterogeneous treatment effects using machine learning. Proceedings of the National Academy of Sciences, 116(10), 4156-4165.