ddml: Double/debiased machine learning in Stata

Achim Ahrens, Christian Hansen, Mark Edwin Schaffer, Thomas Wiemann

Research output: Contribution to journalArticlepeer-review

1 Citation (Scopus)
11 Downloads (Pure)


In this article, we introduce a package, ddml, for double/debiased machine learning in Stata. Estimators of causal parameters for five different econometric models are supported, allowing for flexible estimation of causal effects of endogenous variables in settings with unknown functional forms or many exogenous variables. ddml is compatible with many existing supervised machine learning programs in Stata. We recommend using double/debiased machine learning in combination with stacking estimation, which combines multiple machine learners into a final predictor. We provide Monte Carlo evidence to support our recommendation.
Original languageEnglish
Pages (from-to)3-45
Number of pages43
JournalThe Stata Journal
Issue number1
Early online date19 Mar 2024
Publication statusPublished - Mar 2024


  • causal inference
  • ddml
  • double/debiased machine learning
  • doubly robust estimation
  • machine learning
  • st0738

ASJC Scopus subject areas

  • Mathematics (miscellaneous)


Dive into the research topics of 'ddml: Double/debiased machine learning in Stata'. Together they form a unique fingerprint.

Cite this