Skip to content

ddml

Double/Debiased Machine Learning

v0.3.1 · Dec 11, 2025 · GPL (>= 3)

Description

Estimate common causal parameters using double/debiased machine learning as proposed by Chernozhukov et al. (2018) <doi:10.1111/ectj.12097>. 'ddml' simplifies estimation based on (short-)stacking as discussed in Ahrens et al. (2024) <doi:10.1002/jae.3103>, which leverages multiple base learners to increase robustness to the underlying data generating process.

Downloads

CRAN

335

Last 30 days

11707th

799

Last 90 days

4.6K

Last year

Trend: +93.6% (30d vs prior 30d)

r2u CRAN

11

Last 30 days

29

Last 90 days

134

Last year

Trend: -21.4% (30d vs prior 30d)

CRAN Check Status

1 ERROR
12 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang ERROR
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (1 non-OK)
ERROR r-devel-linux-x86_64-debian-clang

tests

Running ‘testthat.R’ [48s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ddml)
  > 
  > test_check("ddml")
  Saving _problems/test-ddml_fpliv-350.R
  
  sample fold 1/3
  sample fold 2/3
  sample fold 3/3[ FAIL 1 | WARN 1 | SKIP 0 | PASS 142 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-ddml_fpliv.R:344:3'): ddml_fpliv computes with multiple ensemble procedures, multi D ──
  Error in `oos_fitted[subsamples[[k]], ] <- as.numeric(predict.ensemble(mdl_fit, newdata = X[subsamples[[k]], , drop = F], newZ = Z[subsamples[[k]], , drop = F]))`: number of items to replace is not a multiple of replacement length
  Backtrace:
      ▆
   1. └─ddml::ddml_fpliv(...) at test-ddml_fpliv.R:344:3
   2.   └─ddml:::get_CEF(...)
   3.     └─ddml::crosspred(...)
  
  [ FAIL 1 | WARN 1 | SKIP 0 | PASS 142 ]
  Error:
  ! Test failures.
  Execution halted

Check History

ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 24, 2026
ERROR r-devel-linux-x86_64-debian-clang

tests

Running ‘testthat.R’ [48s/62s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ddml)
  > 
  > test_check("ddml")
  Saving _problems/test-ddml_fpliv-350.R
  
  sample fold 1/3
  sample fold 2/3
  samp
...[truncated]...
eplacement length
  Backtrace:
      ▆
   1. └─ddml::ddml_fpliv(...) at test-ddml_fpliv.R:344:3
   2.   └─ddml:::get_CEF(...)
   3.     └─ddml::crosspred(...)
  
  [ FAIL 1 | WARN 1 | SKIP 0 | PASS 142 ]
  Error:
  ! Test failures.
  Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

package dependencies

Package required but not available: ‘AER’

See section ‘The DESCRIPTION file’ in the ‘Writing R Extensions’
manual.
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies AER MASS Matrix nnls quadprog glmnet ranger xgboost ddml

Version History

7 tracked
new 0.3.1 Mar 10, 2026
updated 0.3.1 ← 0.3.0 diff Dec 11, 2025
updated 0.3.0 ← 0.2.2 diff Oct 1, 2024
updated 0.2.2 ← 0.2.1 diff Jun 26, 2024
updated 0.2.1 ← 0.2.0 diff May 25, 2024
updated 0.2.0 ← 0.1.0 diff Jan 8, 2024
new 0.1.0 Aug 28, 2023