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.91k stars 921 forks source link

Continuous Treatment Variable #1057

Closed elakhatibi closed 8 months ago

elakhatibi commented 8 months ago

Hi,

I want to do causal analysis by "dowhy" package for estimating the causal impact of a "continuous" treatment variable (whose range is [0-100] ) on a continuous outcome variable.

I was wondering "dowhy" has provided such capabilities?

Looking forward to hearing from you

Greatly appreciate your help

amit-sharma commented 8 months ago

Yes, that is possible in DoWhy. For a simple analysis, you may start with the LinearRegression estimator in DoWhy. A more advanced analysis may use the double ML estimator from EconML.

For a code walkthrough, have a look at this notebook: https://www.pywhy.org/dowhy/v0.10.1/example_notebooks/dowhy-conditional-treatment-effects.html