py-why / dowhy

DoWhy is a Python library for causal inference that supports explicit modeling and testing of causal assumptions. DoWhy is based on a unified language for causal inference, combining causal graphical models and potential outcomes frameworks.
https://www.pywhy.org/dowhy
MIT License
6.95k stars 924 forks source link

CATE estimation conditioned on a confounding variable? #301

Open cuongtran-syr opened 3 years ago

cuongtran-syr commented 3 years ago

Based on some tutorials, for example :https://microsoft.github.io/dowhy/example_notebooks/dowhy-conditional-treatment-effects.html It seems to me that CATE is defined w.r.t effect modifiers. The effect modifiers are the ones that affect only to the outcome, eg. X0, X1 variables in the tutorial.

Can we compute CATE conditioned a confounding variable. For example, age variable can affect to the treatment and outcome, and we want to compute the CATE given a specific age range.

Thanks

amit-sharma commented 3 years ago

yes, you can do that. Just add the variable age as both a common_cause and as a effect modifier.