matheusfacure / python-causality-handbook

Causal Inference for the Brave and True. A light-hearted yet rigorous approach to learning about impact estimation and causality.
https://matheusfacure.github.io/python-causality-handbook/landing-page.html
MIT License
2.74k stars 475 forks source link

Incorrect interpretation of regression coefficient in Chapter 11 - Propensity Score #215

Closed ArturoSbr closed 2 years ago

ArturoSbr commented 2 years ago

I think I found an issue on Chapter 11 - Propensity Score. The interpretation of the intervention coefficient is incorrect.

The estimated values for smf.ols("achievement_score ~ intervention", data=data).fit().summary().tables[1] are -0.1538 for the intercept and 0.4723 for the intervention.

I believe the following sentence is incorrect.

Simply comparing those with and without the intervention, we can see that the treated have an achievement score that is, on average, 0.3185 (0.4723 - 0.1538) higher than the untreated.

If I'm not mistaken, the Expected Value for the control group is -0.1538, while the Expected Value for the treatment group is -0.1538 + 0.4723. Therefore, the difference in Expected Outcomes is -0.1538 + 0.4723 - (-0.1538) = 0.4723.

ArturoSbr commented 2 years ago

Bump.

matheusfacure commented 2 years ago

This issue is the same as this one, https://github.com/matheusfacure/python-causality-handbook/issues/214, which was solved.