EconML icon indicating copy to clipboard operation
EconML copied to clipboard

Categorical but non-binary treatment

Open vyokky opened this issue 2 years ago • 4 comments

I got a scenario that have categorical but non-binary treatment (can up to five option). Does DML and its variances, or metalearner support such scenario? It seems DML assumes partial treatment effect which does not work for multi-class treatment.

vyokky avatar Apr 04 '23 03:04 vyokky

Our DML instances do support (single) non-binary categorical treatments. Your treatment column should have the raw treatment indicators (e.g. this could be something like [1, 0, 2, 2, 0, 1, 2] or ['a', 'b', 'c', 'c', 'a', 'a'] for a treatment with 3 distinct levels) when calling fit, and likewise when calling effect.

kbattocchi avatar Apr 04 '23 16:04 kbattocchi

How do Interpret the CATE with such a categorical treatment? My treatment can take three values, [1,2,3]. And my outcome variable is also categorical [0,1] Using a SingleTreeCateInterpreter I get two Cate means and two CATE stds. How do I interpret these? I get ATT estimates for T=0, T=1 and T=2 on training data with each having two rows for the point estimate, stderr, zstat etc in the summary. How does one interpret the individual row effects?

UmaVijh avatar Jun 06 '23 23:06 UmaVijh

When there are multiple discrete treatments, we drop the first and the marginal effects should be interpreted as the effect from going from T0 to T1, from T0 to T2, etc. (and any other marginal effect can be computed by a linear combination of these, so the effect of moving from T1 to T2 is (T0 to T2) - (T0 to T1), which is what is computed by the effect method when those treatments are passed as arguments). This also applies to the ATT estimates - you're getting the doubly-robust estimate of the marginal effects of moving from treatment 0 to 1 and from 0 to 2 on the population that actually received treatment T=0, T=1, or T=2 in those cases.

Note that for categorical outcomes you should generally not use a classifier but a regressor as your outcome model, see recent discussions at #775 and #779.

kbattocchi avatar Jun 08 '23 16:06 kbattocchi

for my case I got a scenario that has categorical but non-binary treatment (can up to 11 options), and the same thing for outcome I have more than 20 categories. Does DML and its variances, or metalearner support such a scenario?

ghost avatar Nov 23 '23 11:11 ghost