dowhy icon indicating copy to clipboard operation
dowhy copied to clipboard

How to get percentage effect?

Open bayesEx opened this issue 2 years ago • 2 comments

Have been using dowhy and usually my target is att - this gives incremental value - however how would I change this to show a % increase/decrease?

Is there a way i can use the the values from the weighted outcomes table to calculate this? I am using propensity scoring stratification and it would be helpful to understand how i can calculate the ATT as a relative change.

bayesEx avatar Jul 27 '22 12:07 bayesEx

Since this is the average effect on the treated, you can simply compute the average outcome (Ymean) for the treated units in your dataset. This represents the observed outcome for the treated. Now if the ATT is a, then this means that the average outcome without treatment is estimated to be d=Ymean-a. The % effect will a/Ymean.

Is this what you are looking for?

amit-sharma avatar Aug 03 '22 08:08 amit-sharma

would the % effect from 'control' or counteractial be:

 x = (weighted_outcomes['d_y_mean'] * weighted_outcomes[treatment_sum_name]).sum()/ total_treatment_population 
   y = (weighted_outcomes['dbar_y_mean'] * weighted_outcomes[treatment_sum_name]).sum()/ total_treatment_population

(x-y)/y * 100 ?

zahs123 avatar Aug 04 '22 14:08 zahs123

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

github-actions[bot] avatar Oct 29 '22 02:10 github-actions[bot]

@zahs123 yes, that is the correct expression. For reference, the variables used are in this file.

amit-sharma avatar Nov 02 '22 08:11 amit-sharma