how to calculate causal effect