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.61k stars 456 forks source link

Issue on page /05-The-Unreasonable-Effectiveness-of-Linear-Regression.html #321

Closed dbalabka closed 1 year ago

dbalabka commented 1 year ago

Reading your book, I found a useful log transformation to get a percentage (see np.log(hwage) ~ educ). Still, this approximation trick does not work for big percentage changes. It would be helpful for the unprepared reader to note that it is important to perform hwage=wage["wage"]/wage["hours"] transformation before estimating the percentage.

matheusfacure commented 1 year ago

This is already in the link for those wanting to learn more about it https://stats.stackexchange.com/questions/244199/why-is-it-that-natural-log-changes-are-percentage-changes-what-is-about-logs-th image