Implementations and examples of common offline policy evaluation methods in Python.
-
Updated
Feb 11, 2023 - Python
Implementations and examples of common offline policy evaluation methods in Python.
Taking causal inference to the extreme!
Corresponding code guide to the tutorial paper "Introducing longitudinal modified treatment policies: a unified framework for studying complex exposures" (Hoffman et al., 2023)
R package for fast and easy doubly robust estimation of treatments effects
Learn causal inference by changing the world. Guided lessons and a sandbox with confounders, mediators, colliders, and six estimators, live in the browser
Covariate Adjustment in Randomized Trials
Official repository of DR-VIDAL - accepted in AMIA' 22 (Oral)
hddid: Stata package for doubly robust semiparametric difference-in-differences with high-dimensional covariates. Based on Ning, Peng, and Tao (2020, arXiv:2009.03151).(Public Preview, testing...)(Disclaimer: CURRENTLY WIP)
An evaluation of the suboptimality of various imputation methods when applied to handle various mechanisms of missingness
Python implementation of Covariate Balancing Propensity Score (CBPS) for robust causal inference in observational studies. Supports binary, multi-valued, and continuous treatments. Includes high-dimensional CBPS (hdCBPS), nonparametric CBPS (npCBPS), marginal structural models (CBMSM), and instrumental variables (CBIV).(Disclaimer: CURRENTLY WIP)
Python code to estimate ATE with Doubly Robust method
Empirical study of DM, IPS, SNIPS and DR in contextual bandits under weak overlap, nuisance misspecification, positivity violations and policy shift.
Replicating the classic LaLonde (1986) job-training study to see if propensity score matching can recover a causal effect that naive comparison gets completely backwards
Semiparametric triple-difference estimators for causal inference in panel and repeated cross-section settings, with doubly-robust influence-function-based scores and machine learning flexibility.
Off policy evaluation audit for logged bandits: measures how much of a target policy's probability mass sits outside what the log could have produced, shows that a 95 percent interval around the standard estimator covers 0.26 of the time, and returns exit 2 rather than a number when the estimate would be about a different quantity.
A/B testing meets causal inference on 687k retail customers. Tests whether the arms are actually comparable, corrects the 18% of measured effect that was selection bias, and shows uplift targeting beating response modelling by 67%.
Targeted Maximum Likelihood Estimation — doubly robust causal inference, Poisson TMLE with exposure offset, SuperLearner, CV-TMLE
Causal study of an e-commerce promotion: a naive analysis says $23/customer, doubly-robust estimation says $6.42, planted truth is $5.87. Carried through to a targeting decision.
Zero-to-hero notebooks on causal inference and experimentation for global LLM rollouts: synthetic control, difference-in-differences, propensity scores, regression discontinuity, cluster randomization.
Causal effect of hybrid vs gasoline powertrain on fuel consumption (EPA data, 9 estimators + robustness suite)
To associate your repository with the doubly-robust topic, visit your repo's landing page and select "manage topics."