dowhy
dowhy copied to clipboard
How to get percentage effect?
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.
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?
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 ?
This issue is stale because it has been open for 14 days with no activity.
@zahs123 yes, that is the correct expression. For reference, the variables used are in this file.