MyNixOS website logo
Description

Double Machine Learning in R.

Implementation of the double/debiased machine learning framework of Chernozhukov et al. (2018) <doi:10.1111/ectj.12097> for partially linear regression models, partially linear instrumental variable regression models, interactive regression models and interactive instrumental variable regression models. 'DoubleML' allows estimation of the nuisance parts in these models by machine learning methods and computation of the Neyman orthogonal score functions. 'DoubleML' is built on top of 'mlr3' and the 'mlr3' ecosystem. The object-oriented implementation of 'DoubleML' based on the 'R6' package is very flexible. More information available in the publication in the Journal of Statistical Software: <doi:10.18637/jss.v108.i03>.

DoubleML - Double Machine Learning in R

build codecov CodeFactor CRANVersion

The R package DoubleML provides an implementation of the double / debiased machine learning framework of Chernozhukov et al. (2018). It is built on top of mlr3 and the mlr3 ecosystem (Lang et al., 2019).

Note that the R package was developed together with a python twin based on scikit-learn. The python package is also available on GitHub and PyPIversion.

Documentation and maintenance

Documentation of functions in R: https://docs.doubleml.org/r/stable/reference/index.html

User guide: https://docs.doubleml.org

DoubleML is currently maintained by @PhilippBach and @SvenKlaassen.

Main Features

Double / debiased machine learning framework of Chernozhukov et al. (2018) for

  • Partially linear regression models (PLR)
  • Partially linear IV regression models (PLIV)
  • Interactive regression models (IRM)
  • Interactive IV regression models (IIVM)

The object-oriented implementation of DoubleML that is based on the R6 package for R is very flexible. The model classes DoubleMLPLR, DoubleMLPLIV, DoubleMLIRM and DoubleIIVM implement the estimation of the nuisance functions via machine learning methods and the computation of the Neyman orthogonal score function. All other functionalities are implemented in the abstract base class DoubleML. In particular functionalities to estimate double machine learning models and to perform statistical inference via the methods fit, bootstrap, confint, p_adjust and tune. This object-oriented implementation allows a high flexibility for the model specification in terms of …

  • … the machine learning methods for estimation of the nuisance functions,
  • … the resampling schemes,
  • … the double machine learning algorithm,
  • … the Neyman orthogonal score functions,

It further can be readily extended with regards to

  • … new model classes that come with Neyman orthogonal score functions being linear in the target parameter,
  • … alternative score functions via callables,
  • … alternative resampling schemes,
OOP structure of the DoubleML package

Installation

Install the latest release from CRAN:

remotes::packages("DoubleML")

Install the development version from GitHub:

remotes::install_github("DoubleML/doubleml-for-r")

DoubleML requires

  • R (>= 3.5.0)
  • R6 (>= 2.4.1)
  • data.table (>= 1.12.8)
  • stats
  • checkmate
  • mlr3 (>= 0.5.0)
  • mlr3tuning (>= 0.3.0)
  • mlr3learners (>= 0.3.0)
  • mvtnorm
  • utils
  • clusterGeneration
  • readstata13

Contributing

DoubleML is a community effort. Everyone is welcome to contribute. To get started for your first contribution we recommend reading our contributing guidelines and our code of conduct.

Citation

If you use the DoubleML package a citation is highly appreciated:

Bach, P., Chernozhukov, V., Kurz, M. S., and Spindler, M. (2021), DoubleML - An Object-Oriented Implementation of Double Machine Learning in R, arXiv:2103.09603.

Bibtex-entry:

@misc{DoubleML2020,
      title={{DoubleML} -- {A}n Object-Oriented Implementation of Double Machine Learning in {R}}, 
      author={P. Bach and V. Chernozhukov and M. S. Kurz and M. Spindler and Sven Klaassen},
      year={2024},
      journal={Journal of Statistical Software},
      volume={108},
      number={3},
      pages= {1-56},
      doi={10.18637/jss.v108.i03},
      note={arXiv:\href{https://arxiv.org/abs/2103.09603}{2103.09603} [stat.ML]}
}

Acknowledgements

Funding by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) is acknowledged – Project Number 431701914.

References

  • Bach, P., Chernozhukov, V., Kurz, M. S., Spindler, M. and Klaassen, S. (2024), DoubleML - An Object-Oriented Implementation of Double Machine Learning in R, Journal of Statistical Software, 108(3): 1-56, doi:10.18637/jss.v108.i03, arXiv:2103.09603.

  • Chernozhukov, V., Chetverikov, D., Demirer, M., Duflo, E., Hansen, C., Newey, W. and Robins, J. (2018), Double/debiased machine learning for treatment and structural parameters. The Econometrics Journal, 21: C1-C68, https://doi.org/10.1111/ectj.12097.

  • Lang, M., Binder, M., Richter, J., Schratz, P., Pfisterer, F., Coors, S., Au, Q., Casalicchio, G., Kotthoff, L., Bischl, B. (2019), mlr3: A modern object-oriented machine learing framework in R. Journal of Open Source Software, https://doi.org/10.21105/joss.01903.

Metadata

Version

1.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows