dowhy
dowhy copied to clipboard
DoWhy with Multiple Treatments (T) and Multiple Outcomes (Y)
Hi, @emrekiciman
I have been looking to see if DoWhy supports Multiple Treatments (T) and Multiple Outcomes (Y) causal framework and it seems to be the case using DoWhy/EconMl. For example, CausalForest may be a good candidate. My question is how would I define and pass parameters for both the Treatment and the Outcome when setting up the model? Would the below code work or will I run into issues?
model = CausalModel(data=df, treatment=["T1", "T2", "T3"], outcome=["Y1", "Y2"], common_causes=["W1", "W2", "W3"])
Also, I want to ensure that my treatments can be all continuous variables between 0 - 10 for example? Lastly, can you reference a good example notebook where I can see the predicted CATE for each instance (i.e. user) with each treatment combination(T1, T2, T3)? Something like this output:
user_id | T1 | T2 | T3 | CATE Y1 | CATE Y2
1 | 4 | 0 | 0 | 0.2 | 0.1
1 | 1 | 6 | 1 | 0.22 | 0.13
1 | 2 | 1 | 8 | 0.62 | -0.2
...
Any help is very appreciated.
@emrekiciman do you want to field this one?
@darthtrevino Thank you so much for routing this to the right person. I am so excited to hear back from @emrekiciman.
Hi @titubs, here's an example notebook showing how to setup an analysis with multiple treatments. Does it answer your question? https://py-why.github.io/dowhy/v0.8/example_notebooks/dowhy_multiple_treatments.html
@emrekiciman Thank you so much. This is helpful. The only aspect the notebook does not address is if how to specify multiple (continous outcomes or Ys). Can you please assist with that last aspect?
@emrekiciman Sorry to bother again but I wonder if my last question reg. the multiple outcome aspect came trough?
Hi @titubs , I don't think that multiple outcomes are supported directly. I'd recommend iterating through each of the outcome features and running the multiple treatment analysis for each outcome. I.e., running the analysis once for Y1 and separately again for Y2. Does that make sense in your scenario?
@emrekiciman I found something that may work with EconML/Dowhy. I got to the point of creating an output like this:
The issue I am having is to map the anonymized Ys and Ts into their actual values (I think these are the nuisance models to predict y and t). Essentially, I want to read from the df what explicit treatment combinations had what incremental impact on Y1 and Y2 (since I have two outcomes). I am not sure how to derive that from this output. Can you help?
This issue is stale because it has been open for 14 days with no activity.
We are wokring on adding better support for multiple treatments and outcomes in a future release. The API spec can be found here: https://github.com/py-why/dowhy/wiki/API-proposal-for-v1
This issue is stale because it has been open for 14 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.