0
$\begingroup$

i use lets say log transformation to get better distribution and get better predictions in a regression problem and i do, but here is my problem, lets say without the log transformation i get an $R^2$ of 0.86 and with log transformation i get 0.89, so if i'm not wrong to get the real $R^2$ we should transform the predicted values back to their original distribution and when i do the $R^2$ becomes very close to $R^2$ i got without using the log transformation.

i'm not sure i'm right about doing this but if i am, then what is exactly the point to doing the log transformation?

$\endgroup$
2
$\begingroup$

First of all, R2 is not necessarily a good estimate of the model performance. It is based on the fact that the relationship is linear.

A "jump" from 0.86 to 0.89 is probably not that significant, so you are doing a "good" job right from the start, log trasformation doesn't improve your model.

And it is correct that you get the "first" R2 when you trasform back. In fact when you do a transformation you should always keep in mind that you need to apply an appropriate inverse function on the predictions (ex: log() trasform needs exp() on predictions).

The log trasformation is used in regression in order to "linearize" the relationship between y and x. Also it changes the interpretation of the betas you estimate, infact they highlight a percent unit change after the log trasformation on both y and X.

$\endgroup$
5
$\begingroup$

You should transform your variables for substantive reasons, not statistical ones. There are methods to deal with non-normal variables (and, in fact, OLS regression does not require normally distributed variables, it requires normally distributed errors).

So, for instance, variables related to money (like income and price questions) are often log transformed because we think about money in multiplicative terms rather than additive ones. E.g. If your salary is \$20,000 per year and you get a \$5,000 raise, that's huge. If your salary is \$200,000 per year and you get a \$5,000 raise, it's not so big.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.