dmlGLM: Double Machine Learning for Estimating Treatment Effects

Description Usage Arguments Details Value Examples

View source: R/dmlGLM.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
 9
10
dmlGLM(
  data = NULL,
  dep = NULL,
  treat = NULL,
  compile = TRUE,
  alpha = 1,
  nfolds = 10,
  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.

alpha

what alpha to use for the internal glmnet. 1 = lasso, 0 = ridge.

nfolds

number of folds to use in cross-validating nuisance function.

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

dmlGLM specifically does this using glmnet as the foundational ML model for fitting the nuisance function in cross-splitting.

Value

A named vector or list

Examples

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

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