DML_partial_linear: Double Machine Learning estimation of partially lienar model

View source: R/average_effects.R

DML_partial_linearR Documentation

Double Machine Learning estimation of partially lienar model

Description

This function estimates the parameter of interest in a partially linear model using the residual-on-residual representation of Robinson (1988) and flexibly estimated nuisance parameters following Chernozukov et al. (2018).

Usage

DML_partial_linear(
  y,
  w,
  x,
  ml_w = list(create_method("forest_grf")),
  ml_y = list(create_method("forest_grf")),
  cf = 5,
  cv = 5,
  weights = FALSE,
  path = NULL,
  quiet = TRUE,
  e_hat = NULL,
  m_hat = NULL,
  cf_mat = NULL
)

Arguments

y

Numeric vector containing the outcome variable.

w

Treatment vector (binary or continuous).

x

Covariate matrix.

ml_w

List of methods to be used in ensemble estimation of treatment regression. Methods can be created by create_method. Default is an untuned honest regression_forest.

ml_y

List of methods to be used in ensemble estimation of outcome regression. Methods can be created by create_method. Default is an untuned honest regression_forest.

cf

Number of cross-fitting folds for DML (default 5).

cv

Number of cross-validation folds when estimating ensemble if more than one method is defined in ml_w and/or ml_y (default 5).

weights

If TRUE, prediction weights of the outcome nuisance extracted and saved (requires to provide a path).

path

Optional path to save the ensemble objects of each cross-fit for later inspection.

quiet

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

e_hat

Optional vector of predicted treatment outside of the function.

m_hat

Optional vector of predicted outcome outside of the function.

cf_mat

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

Value

Returns a DML_partial_linear object:

results

Point estimate, standard error, t- and p-value of estimated effect.

e_hat

Predicted treatment

m_hat

Predicted outcomes

w

Treatment vector used in estimation.

y

Vector of outcomes used in estimation.

cf_mat

Matrix with k columns of indicators representing the different folds used in estimation.

path

Path where results are stored if specified, otherwise NULL.

References

  • Robinson, P. M. (1988). Root-N-consistent semiparametric regression. Econometrica, 931-954.

  • Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W., & Robins, J. (2018). Double/Debiased machine learning for treatment and structuralparameters.The Econometrics Journal,21(1), C1-C68


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