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
7.1k stars 934 forks source link

Include conditional effects, p-value and confidence intervals for DML #325

Open juandavidgutier opened 3 years ago

juandavidgutier commented 3 years ago

@amit-sharma Is it possible to include in the next version the conditional effects, p-value and confidence intervals for double machine learning, please?

amit-sharma commented 3 years ago

Those are already supported :) Check out this notebook and look for the subsection, "CATE objects and confidence intervals", https://github.com/microsoft/dowhy/blob/master/docs/source/example_notebooks/dowhy-conditional-treatment-effects.ipynb

Does this work for you?

juandavidgutier commented 3 years ago

@amit-sharma Thanks for the info, and it's just what I needed. Additionally, I have a new question about if it is possible to obtain the individual treatment effect with DML?

juandavidgutier commented 3 years ago

@amit-sharma I follow the example in https://github.com/microsoft/dowhy/blob/master/docs/source/example_notebooks/dowhy-conditional-treatment-effects.ipynb, and I find that the confidence interval is a tuple with 2 arrays each one with10,000 data that I guess corresponds to the lower and upper limits of the confidence interval for the effect estimates. However, I want to obtain the confidence interval for the mean value, How I can get it?

EgorKraevTransferwise commented 2 years ago

How about estimator.effect_inference(X).population_summary()?