dr_learner | R Documentation |
This function produces out-of-sample predictions of conditional average treatment effects (CATEs) for
all individuals in the sample using the DR-learner (Kennedy, 2020).
The involved predictions are based on ensemble
. See algorithm 1 Knaus (2020) for details.
dr_learner(
y,
w,
x,
ml_w = list(create_method("forest_grf")),
ml_y = list(create_method("forest_grf")),
ml_tau = list(create_method("forest_grf")),
compare_all = TRUE,
nfolds = 5,
path = NULL,
quiet = TRUE
)
y |
Numerical vector containing the outcome variable. |
w |
Treatment vector. Provide as factor to control ordering of the treatments, otherwise program orders treatments in ascending order or alphabetically. |
x |
Covariate matrix. |
ml_w |
List of methods to be used in ensemble estimation of propensity score.
Methods can be created by |
ml_y |
List of methods to be used in ensemble estimation of outcome regression.
Methods can be created by |
ml_tau |
List of methods to be used in ensemble estimation of CATEs.
Methods can be created by |
compare_all |
Relevant multiple treatments: If FALSE, only comparisons to first treatment considered. |
nfolds |
Number of folds used in cross-validation of ensemble weights (default |
path |
Optional path to save the |
quiet |
If FALSE, ensemble estimators print method that is currently running. |
cates |
Returns a n x number of comparisons matrix (one column in case of binary treatment) containing the predicted CATEs. |
list |
A list of the four |
cf_mat |
Matrix with k columns of indicators representing the different folds used in estimation. |
Kennedy, E. H. (2020). Optimal doubly robust estimation of heterogeneous causal effects. arXiv preprint arXiv:2004.14497. http://arxiv.org/abs/2004.14497
Knaus, M. C. (2020). Double machine learning based program evaluation under unconfoundedness. arXiv preprint arXiv:2003.03191.http://arxiv.org/abs/2003.03191
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.