All implemented MetaLearners allow the user to call predict_conditional_average_outcomes. At the beginning we thought this was not possible for the RLearner but I think the following formulas may work:
(For ease of notation I'll use $Y(k) := \mathbb{E}[Y_i(k)]$, $Y = \mathbb{E}[Y | X])$, $\tau(k) = \mathbb{E}[Y(k) - Y(0) | X]$ and $e(k) = \mathbb{P}[W = k | X]$)
We know this system of $K$ linear equations is true:
All implemented MetaLearners allow the user to call
predict_conditional_average_outcomes
. At the beginning we thought this was not possible for theRLearner
but I think the following formulas may work:(For ease of notation I'll use $Y(k) := \mathbb{E}[Y_i(k)]$, $Y = \mathbb{E}[Y | X])$, $\tau(k) = \mathbb{E}[Y(k) - Y(0) | X]$ and $e(k) = \mathbb{P}[W = k | X]$)
We know this system of $K$ linear equations is true:
that we need to solve for $Y(0), Y(1), \dots, Y(K)$.
Isolating $Y(1), Y(2), \dots, Y(K)$ from each of the first $K-1$ equations and plugging it into the last we get:
From this we can isolate $Y(0)$ as:
Where we used the fact that all the propensity scores should sum up to 1.
Finally we can compute all $Y(k)$ as $Y(k) = Y(0) + \tau(k)$.
I extracted this idea for the binary case from this code snippet from this reference:
Any thoughts on this @kklein ?