ndr_oos | R Documentation |
This function produces out-of-sample predictions of conditional average treatment effects (CATEs) using the
DR-learner (Kennedy, 2020) and the normalized DR-learner (Knaus, 2020).
It executes steps 1 to 4 of algorithms 1 and 2 in Knaus (2020) as part of the ndr_learner
.
ndr_oos(
y,
w,
x,
xnew,
ml_w = list(create_method("forest_grf")),
ml_y = list(create_method("forest_grf")),
ml_tau = list(create_method("forest_grf")),
cf_mat = NULL,
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. |
xnew |
Covariate matrix of test sample. |
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 |
cf_mat |
Optional logical matrix with k columns of indicators representing the different folds
(for example 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 |
n x 2 matrix containing DR- and NDR-learner predictions in case of a binary treatment or a list of n x 2 matrices with the specified comparisons. |
APO |
|
ATE |
|
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.