dowhy
dowhy copied to clipboard
Mediation analysis: how to choose mediators?
Hi,
I'm working on a model where there are several variables along the causal path from the treatment to the outcome (i.e., more than one variable is affected by the treatment and in turns affects the outcome).
I understand that the current version of DoWhy can calculate estimates for NDE and NIE with a single such mediator variable.
My issue is I could not find a way to set which one I'd like to consider. I could also not determine how the mediator is internally determined once I call my_model.identify_effect(estimand_type="nonparametric-nie")
Is there a plan to allow users more control on this? Perhaps allowing mediators_names
to be passed as an optional keyword argument to .identify_effect()?
This is a good idea @santboia. It makes sense to allow users to specify mediators_names
. Will notify you once this update goes into master branch.
Is there any update on this? I am trying to apply dowhy with multiple mediators. It seems that it can only handle one (randomly selected).