# What is better to transform doing linear regression, response or explanatory variable(s)?

Maybe it is a very basic question and already answered, but I could not find a clear answer.

My plots of response vs. predictors show "curved" relationship, and log-transformation can help to achieve linearity. But it helps either when I log-transform response variable or when I log-transform explanatory variables, as well. The distributions of them all are more or less close to normal.

So, what is better to transform, response or predictors, from statistical point of view? Or it doesn't matter for regression and I only need to seek to normal distributions?

(I see here that when predictors are not transformed then R2 is related to the variance of the residuals and can be trusted. Is it the only reason?)

• since you say that there is a curved relationship between the predictor and the response, have you considered a quadratic term in your regression model? – Eric Peterson Apr 9 '13 at 2:19
• I tried square and root transformations; but if you mean adding squares of predictors to the regression equation, then no. – nadya Apr 9 '13 at 2:28
• yes, if you see a curve linear relationship between predictor and response, then perhaps a model that contains a quadratic term, $X^2$ in one of the predictor terms would be a better fit. – Eric Peterson Apr 9 '13 at 2:36
• if transforming either leads to a reasonable description of the mean, I'd focus on which one did a better job of describing the variance. What are your responses and predictors measuring? – Glen_b Apr 9 '13 at 3:44
• My predictors are signals going through a medium with attenuation and response is the distance. Physical background of all that says that the dependence is logarithmic. @Glen_b – nadya Apr 10 '13 at 5:49

It depends on the situation. When you have multiple independent variables, sometimes only one of them has a nonlinear relationship - in this case, transforming the dependent variable may cause problems with the other variables. In some cases, a log transform makes more substantive sense for one or the other variable. If you log transform the DV only then you are saying that arithmetic changes in the IVs relate to geometric changes in the DV. If you transform (some or all) IVs, then just the reverse. Often, variables related to income or other amounts make more sense log transformed. That is, a change in income from \$20,000 per year to \$40,000 is more like (in some sense) a change from \$200,000 to \$400,000 than a change from \$200,000 to \$220,000. If NONE of your variables can be sensibly log-transformed, it might be better to pursue some non-linear regression such as splines.