← Back to all sparks
D

ddml

INFRA · APIS
Velocity0.0

Double/Debiased Machine Learning

Double machine learning in R keeps adding estimands and the inference to go with them.

causal-inferencemachine-learningeconometricsstackingtreatment-effects
Current state
ddml implements double and debiased machine learning estimators, with a stacking layer so the nuisance functions can be fit by an ensemble rather than a single learner. The estimand list has grown from partially linear models to average treatment effects, treatment effects on the treated, and local average treatment effects, and 0.3.0 added one-way clustered inference. The most recent release is maintenance: xgboost syntax, glmnet binomial predictions, weights in the flexible partially linear IV estimator.
Where it's heading
Two lines of work run in parallel. One extends what can be estimated, the other makes the estimates trustworthy under real data conditions, and the second is where the recent effort has gone: clustered standard errors, propensity score trimming, higher default fold counts, corrected ATE and LATE scores. Raising sample_folds and cv_folds to ten is a small change with a clear intent, trading compute for stability.
Prediction
Clustered inference arrived one-way; two-way and multi-way clustering are the obvious continuation. The stacking layer is also accumulating edge-case handling, so expect more work on degenerate ensemble weights.

Recent moves

  1. 8mo ago

    Fixes for weighted FPLIV, binomial glmnet and empty stacking weights

    A correctness release across the learner wrappers and one estimator: xgboost syntax updated, glmnet predictions fixed for binomial regression, ddml_fpliv() fixed with custom weights, and stacking now tolerates the case where no positive weights come out. The last is the kind of failure that only appears once an ensemble is used on hard data.

    View source ↗
  2. 1y ago

    One-way clustered inference and higher default fold counts

    Clustered standard errors arrive, which is what makes the estimators usable on the panel and grouped data most applied work involves. Defaults for sample_folds and cv_folds both rise to ten, spending compute to reduce the split-to-split variability double machine learning is known for.

    View source ↗
  3. 2y ago

    Propensity score trimming added across the treatment effect estimators

    Trimming appears on ddml_ate(), ddml_att() and ddml_late(), addressing the extreme propensity scores that make double machine learning estimates blow up in practice. Corrections to the ATE and LATE scores ship alongside, and mdl_ranger() gains probability forest compatibility.

    View source ↗
  4. 2y ago

    Fixes permuted residuals returned by crossval

    A single fix for permuted residuals returned by crossval. Narrow, but in a cross-fitting package the residual ordering is load-bearing.

    View source ↗
  5. 2y ago

    ATT and LATE estimators join the supported estimands

    The release that widened what the package can answer, adding the average treatment effect on the treated and local average treatment effects including the perfect compliance and non-compliance cases. Custom ensemble weights and an mdl_glm wrapper arrive with it, alongside an article on integrating with the did package.

    View source ↗