Heterogeneous Treatment Effect Using Double Machine Learning

Zain Ahmed8 Nov 2022

Problem

An analyst who wants to know how a continuous treatment, for example price, changes an outcome, such as sales, usually has only observational data. Many confounders influence both the treatment and the outcome. Meta-learners do not fit, because they cannot handle a continuous treatment. Confounders can act non-linearly and interact, so a linear adjustment is not enough. The analyst also wants the effect per customer segment, not one average.

Example from the article: synthetic sales data of a juice brand, where the goal is the price elasticity as a function of temperature.

Solution in brief

Double machine learning (DML) removes the confounders' influence from both the outcome and the treatment with two ML models. It then regresses the outcome residuals on the treatment residuals. Letting the effect depend on covariates gives the conditional average treatment effect (CATE), for example elasticity by temperature.

Questions this case answers
  • How to estimate a heterogeneous effect of a continuous treatment from observational data when many confounders drive both the treatment and the outcome and meta-learners for binary treatments do not apply
  • How to estimate how the effect of a continuous treatment, such as price, differs across customers when there are many confounders?
  • How to estimate price elasticity as a function of covariates such as temperature from observational sales data?
  • How to avoid biased treatment effects when flexible ML models are used to control for confounders?

Tools and methods

  • Double machine learning (DML) — residual-on-residual estimation of the treatment effect with ML models for confounders
  • CATE estimation — effect that varies with unit covariates, via interactions or a weighted ML model on residuals
  • EconML — Microsoft library with several DML variants, used in the article's example
Continue reading — it's free

Google or a one-time email code. No password.