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.01k stars 922 forks source link

How do we check if treated and control groups are balanced properly after propensity score weighting? #951

Closed leechelseahaosin closed 1 year ago

leechelseahaosin commented 1 year ago

I would like to double check if weighting was done properly such as the R's cobalt package and its love.plot() functionality

Is there such a functionality? It seems related to issue #814 but I am using estimate_effect() with 'backdoor.propensity_score_weighting' with weighting_scheme ='ips_weight`. The estimator object does not have what I am looking for.

If not, what would be the suggested way to check if weighting was appropriate?

Version information:

amit-sharma commented 1 year ago

For stratification, dowhy has a balance interpreter. You can use it as, estimate.interpret('propensity_balance_interpreter') Is this what you are looking for?

It should be possible to extend it to the weighting-based estimator too.

leechelseahaosin commented 1 year ago

The code looks like what I am imagining.

However, when using weighted-based estimator using 'ips_weight', I see that it's not supported.

estimate.interpret('propensity_balance_interpreter')
ValueError: The interpreter method only supports propensity score stratification estimator.
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 14 days with no activity.

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 7 days since being marked as stale.