Package: ddml 0.9.0

Thomas Wiemann

ddml: Double/Debiased Machine Learning

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.

Authors:Achim Ahrens [aut], Christian B Hansen [aut], Mark E Schaffer [aut], Thomas Wiemann [aut, cre]

ddml_0.9.0.tar.gz
ddml_0.9.0.zip(r-4.7)ddml_0.9.0.zip(r-4.6)ddml_0.9.0.zip(r-4.5)
ddml_0.9.0.tgz(r-4.6-any)ddml_0.9.0.tgz(r-4.5-any)
ddml_0.9.0.tar.gz(r-4.7-any)ddml_0.9.0.tar.gz(r-4.6-any)
ddml_0.9.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
ddml/json (API)
NEWS

# Install 'ddml' in R:
install.packages('ddml', repos = c('https://thomaswiemann.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/thomaswiemann/ddml/issues

Pkgdown/docs site:https://thomaswiemann.com

Datasets:
  • AE98 - Random Subsample from the Data of Angrist & Evans

On CRAN:

Conda:

6.04 score 24 stars 46 scripts 257 downloads 30 exports 19 dependencies

Last updated from:e17f94c638. Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64NOTE188
source / vignettesOK218
linux-release-x86_64NOTE195
macos-release-arm64NOTE152
macos-oldrel-arm64NOTE118
windows-develNOTE139
windows-releaseNOTE182
windows-oldrelNOTE145
wasm-releaseOK138

Exports:crosspredcrossvalddmlddml_apoddml_ateddml_attddml_attgtddml_fplivddml_lateddml_plivddml_plmddml_policyddml_repddml_replicatediagnosticsensembleensemble_weightsglancelincomlincom_weights_didmdl_bigGlmmdl_glmmdl_glmnetmdl_rangermdl_xgboostolsralral_repshortstackingtidy

Dependencies:codetoolsdata.tableforeachgenericsglmnetiteratorsjsonlitelatticeMASSMatrixnnlspbapplyquadprograngerRcppRcppEigenshapesurvivalxgboost

Get Started

Rendered fromddml.Rmdusingknitr::rmarkdownon May 16 2026.

Last update: 2026-04-16
Started: 2023-01-27

Readme and manuals

Help Manual

Help pageTopics
Random Subsample from the Data of Angrist & Evans (1998)AE98
Split a DDML Object by Ensemble Typeas.list.ddml
Split a ddml_rep Object by Ensemble Typeas.list.ddml_rep
Split a RAL Object by Fitas.list.ral
Split a RAL Rep Object by Fitas.list.ral_rep
Extract Coefficients from a RAL Objectcoef.ral
Extract Aggregated Coefficientscoef.ral_rep
Confidence Intervals for RAL Estimatorsconfint.ral
Confidence Intervals for RAL Rep Objectsconfint.ral_rep
Cross-Fitted Predictions Using Stackingcrosspred
Estimator of the Mean Squared Prediction Error Using Cross-Validationcrossval
Construct a 'ddml' Object.ddml
Estimator for the Average Potential Outcomeddml_apo
Estimator for the Average Treatment Effectddml_ate ddml_att
Estimator for Group-Time Average Treatment Effectsddml_attgt
Estimator for the Flexible Partially Linear IV Coefficientddml_fpliv
Estimator for the Local Average Treatment Effectddml_late
Estimator for the Partially Linear IV Coefficientddml_pliv
Estimator for the Partially Linear Regression Coefficientddml_plm
Estimator for the Multi-Action Policy Valueddml_policy
Construct a Multi-Resample DDML Objectddml_rep print.ddml_rep
Replicate a DDML Estimator Across Multiple Resamplesddml_replicate
Intro to Double/Debiased Machine Learningddml-intro
Stacking Diagnostics for DDML Estimatorsdiagnostics
Stacking Estimator Using Combinations of Base Learnersensemble
Compute Stacking Weights for Base Learnersensemble_weights
Glance at a DDML Objectglance.ddml
Glance at a ddml_rep Objectglance.ddml_rep
Glance at a RAL Objectglance.ral
Glance at a RAL Rep Objectglance.ral_rep
Extract leverage (Hat Values)hatvalues.ral
Linear Combinations of DDML Coefficientslincom lincom.ddml lincom.ddml_rep print.lincom print.lincom_rep
Difference-in-Differences Aggregation Weights for lincomlincom_weights_did
Wrapper for glmnet::bigGlm()mdl_bigGlm
Wrapper for stats::glm()mdl_glm
Wrapper for glmnet::glmnet()mdl_glmnet
Wrapper for ranger::ranger()mdl_ranger
Wrapper for xgboost::xgboost()mdl_xgboost
Number of Observations in a RAL Objectnobs.ral
Ordinary Least Squaresols
Plot Coefficients from a RAL Estimatorplot.ral plot.ral_rep
Predict Method for 'ensemble' Objectspredict.ensemble
Predict Method for mdl_bigGlm Objectspredict.mdl_bigGlm
Predict Method for mdl_glm Objectspredict.mdl_glm
Predict Method for mdl_glmnet Objectspredict.mdl_glmnet
Predict Method for mdl_ranger Objectspredict.mdl_ranger
Predict Method for mdl_xgboost Objectspredict.mdl_xgboost
Predict Method for ols Objectspredict.ols
Print Stacking Diagnosticsprint.ddml_diagnostics
Construct a RAL Inference Objectral
Construct a Replicated RAL Inference Objectral_rep
Predictions using Short-Stackingshortstacking
Summary for DDML Estimatorsprint.summary.ddml summary.ddml
Summary for ddml_rep Objectsprint.summary.ddml_rep summary.ddml_rep
Summary for RAL Estimatorsprint.summary.ral summary.ral
Summary for RAL Rep Objectsprint.summary.ral_rep summary.ral_rep
Tidy a DDML Objecttidy.ddml
Tidy Stacking Diagnosticstidy.ddml_diagnostics
Tidy a ddml_rep Objecttidy.ddml_rep
Tidy a RAL Objecttidy.ral
Tidy a RAL Rep Objecttidy.ral_rep
Variance-Covariance Matrix for RAL Estimatorsvcov.ral
Variance-Covariance Matrix for RAL Rep Objectsvcov.ral_rep