# Transforming Heterogeneous Treatment Effect Models (in EconML) into Average Treatment Effect Model (from DoWhy)

This question relates to the steps one would need to take in order to reproduce an answer from the DoWhy tutorial, using the EconML library code for heterogeneous causal effects.

In DoWhy, there is the following tutorial example to calculate the ATE (average treatment effect) of the Lalonde dataset:

https://microsoft.github.io/dowhy/dowhy_lalonde_example.html

In particular I am concerned with answer:

Causal Estimate is 1634.98683597

This was achieved in DoWhy based on propensity score weighting.

Now, EconML is a library based on Heterogeneous treatment effects, and in particular they advocate for "Double Machine Learning" models of the sort:

$$$$\begin{split}Y =~& \theta(X) \cdot T + g(X, W) + \epsilon ~~~&~~~ \mathbb{E}[\epsilon | X, W] = 0 \\ T =~& f(X, W) + \eta & \mathbb{E}[\eta \mid X, W] = 0 \\ ~& \mathbb{E}[\eta \cdot \epsilon | X, W] = 0\end{split}$$$$

where where some treatment(s)/intervention(s)/action(s) $$T$$ were chosen and some outcome(s) $$Y$$ were observed and all the variables $$W$$ that could have potentially gone into the choice of $$T$$, and simultaneously could have had a direct effect on the outcome $$Y$$ (aka controls or confounders) are also recorder in the dataset.

https://econml.azurewebsites.net/spec/estimation/dml.html

In this model the "causal estimate" is reflected in parmeter $$\theta(X)$$. Heterogeniety arises because this is a function of $$X$$ - our required observable characteristics.

Naturally one can transform a problem based on CATE (conditional average treatment effect - which considers heterogeneity), to ATE by the law of iterated expectations:

$$$$\mathbb{E}[Y(1) - Y(0)] = \mathbb{E}\left[\mathbb{E}[Y(1) - Y(0) \mid X ]\right]$$$$

Therefore it seems one should be able to transform CATE estimates into ATE estimates (i.e. use the EconML library to reproduce answers from DoWhy). However I'm not sure how to get an answer of $$\theta(X) = 1634.986$$ in this situation.

I've considered the following:

• Evidently $$\theta(X)$$ is a function of $$X$$, but ATE estimates are not. Therefore can I input something like X = numpy.ones(N), to force the $$\theta$$ estimate to behave constant wrt $$X$$?

• Perhaps I can try to remove the heterogeniety by off-loading $$X$$ into set $$W$$, and then making the left over $$X$$ in $$\theta(X)$$ to be random noise? i.e. X = numpy.random.randn(N)?

Question:

Essentially I can't see a straightforward / intuitive way to transform the causal estimate from Double Machine Learning (using EconML) to the equivalent ATE estimate - where I use this Lalonde causal estimate of ATE = 1634.986 as the example.

Does anyone have any idea how this problem should be approached?