avehtari / ROS-Examples

Regression and other stories R examples
https://avehtari.github.io/ROS-Examples/
325 stars 256 forks source link

P.194 - P.195 log-log model #124

Closed ksnikiforov closed 12 months ago

ksnikiforov commented 1 year ago

This paragraph suggests that the relationship between x and y is linear for log-log transformation, when in fact it is not.

image

I'm using this article as a reference \ https://medium.com/@kyawsawhtoon/log-transformation-purpose-and-interpretation-9444b4b049c9

image

So the correct statement should be that for a one percent change in $X$, $y$ changes by ${1.01}^{1.62}$\ The difference is small for small percent changes, but for large changes exponential formula gives vastly different results.

andrewgelman commented 1 year ago

The statement in the book is essentially correct. When x is multiplied by 1.01, this corresponds to increasing log x by log(1.01) = 0.01, which corresponds to increasing log y by 0.0162, which corresponds to multiplying y by exp(0.0162) = 1.0162. OK, actually 1.0163 but that's close enough. I'll add "approximately" to clarify.