causalDML-package: causalDML: Causal Double Machine Learning

causalDML-packageR Documentation

causalDML: Causal Double Machine Learning

Description

An implementation of Double Machine Learning based method as discussed by Chernozhukov et al. (2018) and reviewed in Knaus (2020). Tailored for program evaluation with potentially multiple treatments, it estimates average potential outcomes and average treatment effects.

Author(s)

Michael C. Knaus

References

  • Chernozhukov, V., et al. (2018). Double/Debiased machine learning for treatment and structural parameters. *The Econometrics Journal*, 21(1), C1–C68.

  • Knaus, M. C. (2022). Double machine learning based program evaluation under unconfoundedness. *The Econometrics Journal*, 25(3). https://doi.org/10.1093/ectj/utac015

Examples

# Generate data
n = 50
p = 10
X = matrix(rnorm(n * p), n, p)
W = rbinom(n, 1, 0.5)
Y = pmax(X[, 1], 0) * W + X[, 2] + pmin(X[, 3], 0) + rnorm(n)

# Run causal DML
cDML = causalDML(Y, W, X)

# Show average potential outcome estimates
summary(cDML$APO)

# Show average treatment effect estimates
summary(cDML$ATE)


MCKnaus/causalDML documentation built on June 11, 2025, 12:30 a.m.