This R package calculates the outcome weights derived in Proposition 1 of Knaus (2024). Its use is illustrated in the vignettes of the package website.
The core functionality is the get_outcome_weights() method that can be called with
objects of the package internal Double ML implementation and the grf package.
In the future it should be compatible with as many estimated R objects as possible.
The package can be downloaded from CRAN:
install.packages("OutcomeWeights")
The package is work in progress. Find here the current state (suggestions welcome):
grf package
causal_forest() outcome weights for CATEinstrumental_forest() outcome weights CLATEcausal_forest() outcome weights for ATE from average_treatment_effect()
average_treatment_effect()
regression_forest() of grf package)dml_with_smoother() function runs for PLR, PLR-IV, AIPW-ATE, and Wald_AIPW and is compatible with get_outcome_weights()
DoubleML (this is a non-trivial task as the mlr3 environment it builds on does not provide smoother matrices)
mlr3 available, where possiblemlr3 accessible within DoubleMLget_outcome_weights() method for DoubleML estimatorslm()
lm_robust() of the estimatr packageivreg() of the AER packageThe development version is available using the devtools package:
library(devtools)
install_github(repo="MCKnaus/OutcomeWeights")
Knaus, M. C. (2024). Treatment effect estimators as weighted outcomes, arXiv:2411.11559