EconML icon indicating copy to clipboard operation
EconML copied to clipboard

Can Treatment(T) itself be Effect Modifier(X) in DML estimators?

Open OliverTseng opened this issue 3 years ago • 2 comments

Hi there, thanks for your great job for creating this awesome package. I've been learning sample notebooks. It seems like CausalForestDML can catch nonparametric heterogeneity perfectly when Xs are other feature without T. My question is what if X contain T or X is T? For example theta(T) = 1*(T<10) and Y=theta(T)*T+....... I've create some experimental dataset, CausalForestDML performs poorly at this situation. My guess is since X can perfectly predict T, so T residual will be 0 at the first stage of DML, so maybe DML is not a good choice. If that's true, what are the alternative estimators that can handle this problem?

OliverTseng avatar Sep 18 '22 10:09 OliverTseng

You're right that if X can perfectly predict T then there is no residual that we can use to predict the treatment effect when we're using estimators like DML, so it's expected that it will not recover your function theta.

In general, almost all of our estimators assume that the treatment effect is linear in the treatment T, which would not be the case if theta itself depends on T. You could, however, featurize T and pass that in instead of the raw treatment. In this case, you would still need the assumptions (e.g. unconfoundedness) to hold for your featurized T and Y, but assuming the assumptions hold that can give you more flexibility in the dependence on the original T.

kbattocchi avatar Sep 19 '22 14:09 kbattocchi

@kbattocchi Thanks for your reply! Is the argument featurizer in CausalForestDML created for that purpose? Or it's for featurizing X? If it is the latter, then I'll have to featurize T by myself, Is that right? And do you have any suggestion for how to featurize T? Take theta(T) = 1*(T<10) for example, does it need to be sophisticated enough in order to capture the real effect? So maybe PolynomialFeatures(degree=5, include_bias=True) is better than PolynomialFeatures(degree=2, include_bias=True).

OliverTseng avatar Sep 20 '22 16:09 OliverTseng