to be the pseudo-outcome[^1] and then you threw away the denominator since you are interested in comparing treatment effects, not their absolute values. But doing so does not preserve order[^2]. Instead why don't we just simplify it to be
Y^*_i = \dfrac{Y_i- \bar{Y}}{T_i - M(T_i)}?
Now onto the actual issue: the code block that came after
[^1]: The denominator I assume is an estimate of the conditional variance Var(T|X), but for most regression methods this residual is an underestimate.
[^2]: In the end we will average those values up to estimate the CATE. But unlike the randomized treatment case where every term is scaled by σ² and can be un-scaled without changing order, here each term has a different factor.
First of all, thank you for making this very accessible book!
In the section about continuous treatment in chapter 20, you defined
to be the pseudo-outcome[^1] and then you threw away the denominator since you are interested in comparing treatment effects, not their absolute values. But doing so does not preserve order[^2]. Instead why don't we just simplify it to be
Now onto the actual issue: the code block that came after
is
but this is missing some parentheses, so it actually computes
[^1]: The denominator I assume is an estimate of the conditional variance Var(T|X), but for most regression methods this residual is an underestimate. [^2]: In the end we will average those values up to estimate the CATE. But unlike the randomized treatment case where every term is scaled by σ² and can be un-scaled without changing order, here each term has a different factor.