dr_core: Core function of 'dr_learner'. It executes steps 2 and 4 of...

View source: R/dr_learner.R

dr_coreR Documentation

Core function of dr_learner. It executes steps 2 and 4 of algorithm 1 in Knaus (2020).

Description

Core function of dr_learner. It executes steps 2 and 4 of algorithm 1 in Knaus (2020).

Usage

dr_core(
  ml,
  delta,
  y,
  x,
  w_mat,
  m_mat,
  e_mat,
  cf_mat,
  xnew = NULL,
  nfolds = 5,
  path = NULL,
  quiet = TRUE
)

Arguments

ml

List of methods to be used in ensemble estimation. Methods can be created by create_method.

delta

vector of doubly robust score. E.g. create via ATE_dml.

y

Vector of variable to be predicted.

x

Matrix of covariates.

w_mat

Logical matrix of treatment indicators (n x T+1). For example created by prep_w_mat.

m_mat

n x T+1 matrix with fitted outcome values.

e_mat

n x T+1 matrix with propensity scores.

cf_mat

Logical matrix with k columns of indicators representing the different folds (for example created by prep_cf_mat).

xnew

Covariate matrix of test sample

nfolds

Number of folds used in cross-validation of ensemble weights (default nfolds=5)

path

Optional path to save the ensemble objects for later processing. Saved as Ensemble_Yi where i is the number of the treatment in multiple treatment settings.

quiet

If FALSE, ensemble estimators print method that is currently running.

Value

Vector with predicted CATEs.

References

  • Knaus, M. C. (2020). Double machine learning based program evaluation under unconfoundedness. arXiv preprint arXiv:2003.03191.http://arxiv.org/abs/2003.03191


MCKnaus/causalDML documentation built on Aug. 19, 2023, 5:47 p.m.