dmlRF: Double Machine Learning for Estimating Treatment Effects

Description Usage Arguments Details Value Examples

View source: R/dmlRF.R

Description

One of several functions in this package that performs the estimation of the debiased estimator as outlined in Chernozhukov et al (2016). It requires the user to provide a data frame, column indexes for the dependent and treatment variable, how many splits to perform, and whether to summarize the results or return all the output data in a list instead. The user also has a choice of how theta is calculated.

Usage

1
2
3
4
5
6
7
8
dmlRF(
  data = NULL,
  dep = NULL,
  treat = NULL,
  compile = TRUE,
  splits = 2,
  DML = "DML1"
)

Arguments

data

a data frame with dependent, treatment, and control variables.

dep

the column number of the dependent variable.

treat

the column number of the treatment variable.

compile

if TRUE, summarize the results.

splits

number of sample splits used to estimate treatment effect.

DML

1 - theta as calculated in equation 1.3 of Chernozhukov et al. (2016). 2 - theta as calculated in the footnotes on page 4 of Chernozhukov et al. (2016). 3 - theta using the Frisch-Waugh-Lovell style residual on residual regression.

Details

dmlRF specifically does this using the random forest from the randomForest package as the foundational ML model for fitting the nuisance function in cross-splitting.

Value

A named vector or list

Examples

1
dmlRF(data, dep = 1, treat = 2, splits = 3, DML = "FWL")

mtvseven/DoubleDragon documentation built on July 22, 2020, 10:57 a.m.