calibratedDML GitHub

R package

Use calibrated_dml() to fit from a data frame, or calibrated_dml_from_nuisances() to calibrate predictions from existing models.

Install from GitHub

remotes::install_github("Larsvanderlaan/calibratedDML")

Inputs

Name the outcome, treatment, and covariate columns, and specify control_level. The package cross-fits the nuisance models and returns arm means and treatment-versus-control contrasts.

Run the complete example to see the fit and its output.

Supply nuisance predictions

Use column names matching the treatment levels or set treatment_levels explicitly. See supplied nuisance predictions for the matrix definitions and the call in R.

For other regression targets, use calibrated_linear_functional() with cross-fitted regression and Riesz estimates and a specified linear functional.

Choose nuisance learners

Built-in choices include lasso, linear models, random forests, GAMs, and boosted trees. You can also supply a custom model list, a SuperLearner library, or an sl3 learner. The custom-learner vignette gives examples.

Confidence intervals

Use confint(fit) for all intervals, or confint(fit, type = "contrast") for treatment contrasts. See the inference guide for the V-fold jackknife default and other methods.

Options and defaults · R vignettes · Adaptive DML