[R] variable transformation for lm

Johannes Radinger JRadinger at gmx.at
Thu Nov 3 16:55:08 CET 2011


I am doing a simple regression using lm(Y~X).
As my response and my predictor seemed to be skewed
and I can't meet the model assumptions. Therefore
I need to transform my variables.

I wanted to ask what is the preferred way to find out
if predictor and/or response needs to be transformed
and if yes how (log-transform?).

I found a procedure in "A modern approach to Regressoin
in R" (Sheather, 2009): There they suggest an approach
with the function bctrans from alr3...but it seems that it
is deprecated. So what is the best way (box-cox test) find the best
transformation for predictor and response simultaneously?
AFAIK boxcox from MASS is used only used for transformation
of the predictor?

Thank you very much


More information about the R-help mailing list