R Package

Use calibratedDML from R.

This page covers the standard R workflow, supplied-nuisance entry points, and available inference modes. Adaptive DML is documented separately on the Adaptive page. For longer runnable walkthroughs, see the Tutorials page.

Install

Install the R package from GitHub

The repository contains the R package alongside the Python package. GitHub is the current public install path from this repository, with built-in nuisance model choices plus optional sl3 and SuperLearner integration.

Install

GitHub

remotes::install_github("Larsvanderlaan/calibratedDML")

Optional

Nuisance learners

The package can integrate with sl3 and SuperLearner when those ecosystems are available.

Output

Printed summaries

Standard fitted objects support summary() for a quick table of arm means and treatment-vs-control contrasts.

Entry Points

Main R entry points

Fit the standard estimator from raw data or start from supplied cross-fitted nuisance estimates.

Main R entry point

calibrated_dml()

  • Categorical treatment support in the standard estimator
  • Fits nuisances internally when mu_mat and pi_mat are omitted
  • Returns fitted objects with printed summaries
  • Supports wald, bootstrap, and jackknife

Supplied nuisance estimates

calibrated_dml_from_nuisances()

  • Supply cross-fitted mu_mat and pi_mat directly
  • Useful for custom nuisance pipelines and reproducibility checks
  • Still runs the calibration, debiasing, and inference layers
  • Works with explicit treatment-level alignment

Inference

Inference choices and package scope

Choose the inference mode explicitly. The standard estimator and the adaptive page document different estimator families with different guarantees.

Standard estimator

calibrated_dml() is the main entry point for calibrated DML with categorical treatment.

Inference modes

The standard estimator supports "wald", "bootstrap", and "jackknife". Choose the uncertainty layer explicitly rather than inheriting it by accident.

Adaptive DML

The separate Adaptive page documents the binary-treatment adaptive estimator family.

It has different guarantees and its own inferential scope.