The Stata package ddml implements Double/Debiased Machine Learning (DDML; Chernozhukov et al. 2018) for Stata. The three main features of the program:

  • ddml supports five different statistical models that allow to flexibly control for confounders: (1) the Partially Linear Model, (2) the Interactive Model (for binary treatment), (3) the Partially Linear IV Model, the (4) High-dimensional IV Model, and (5) the Interactive IV Model (for binary treatment and instrument).

  • ddml provides flexible multi-line syntax and short one-line syntax. The multi-line syntax offers a wide range of options, guides the user through the DDML algorithm step-by-step, and includes auxiliary programs for storing, loading and displaying additional information. We also provide a complementary one-line version called qddml (‘quick’ ddml), which uses a similar syntax as pdslasso and ivlasso.

  • ddml is designed to be used in combination with existing supervised machine learning programs available in or via Stata. The requirements for compatibility with ddml are minimal: Any eclass program with the Stata-typical reg y x syntax, support for if conditions and post-estimation predict is compatible with ddml.

Our recommendation is to use ddml in combination with pystacked. While pystacked allows for fast estimation of popular supervised machine learners, the main advantages is its support for stacking regression and classification.

Reference #

Victor Chernozhukov, Denis Chetverikov, Mert Demirer, Esther Duflo, Christian Hansen, Whitney Newey, James Robins, Double/debiased machine learning for treatment and structural parameters, The Econometrics Journal, Volume 21, Issue 1, 1 February 2018, Pages C1–C68, https://doi.org/10.1111/ectj.12097