1
$\begingroup$

I have a multiple linear regression model with several dependent variables that have positive, negative, and zero values, and are not normally distributed. I can't do a natural log transformation because of the 0 and negative values, can't square or cube it due to 0 values, and the Box-Cox transformation works only for positive and 0 values. Is there a transformation I can do that works for all of these? I've seen log(x+minimum value) as one option, but not so much here on this forum—is this a valid transformation?

$\endgroup$
  • $\begingroup$ You can certainly do a log transformation by adding a constant, but why do you want to transform these data ? $\endgroup$ – Robert Long Feb 1 at 15:32
  • 1
    $\begingroup$ Would something like sign(x) * log(1 + abs(x)) work? It's a one-to-one transformation that has a log effect on both positive and negative values. It doesn't have issues handling x=0 either. $\endgroup$ – jjet Feb 1 at 15:41
  • $\begingroup$ @RobertLong some of the variables are positively skewed. $\endgroup$ – user10831611 Feb 1 at 15:42
  • 2
    $\begingroup$ Squares and cubes of zero are perfectly well defined; the problem is different with squares, namely that $-x$ and $x$ produce the same square so the transformation is not one-to-one. Cubes are often a bad idea because they will typically increase (the magnitude of) skewness and exaggerate outliers. $\endgroup$ – Nick Cox Feb 1 at 15:53
  • 1
    $\begingroup$ Concerning your actual problem of multiple regression, please investigate the threads on this site related to transformation of variables in multiple regression: there appear to be hundreds of them. You might begin by reviewing the highest voted and answered questions. $\endgroup$ – whuber Feb 1 at 15:58
3
$\begingroup$

Yes, you can add a constant and then take a logs.

There are many ways to transform data.

There is nothing inherently invalid about doing this, but very often such transformations are misguided. It is not necessary for the dependent variable to be normally distributed. The assumption about normality concerns the residuals, not the response variable itself. If the residuals are not plausibly normally distributed then of course some transformation may be warranted.

One major downside of such transformations is that it makes sensible model interpretation much more difficult.

$\endgroup$
  • 1
    $\begingroup$ There is some positive skewness to some variables, which is why I wanted to transform them. But I understand that such methods may not be the best way—so is it not absolutely necessary to transform them, and to run the values as they are in the regression? $\endgroup$ – user10831611 Feb 1 at 15:44
  • 4
    $\begingroup$ That is not a good reason to transform them. Fit the model first, with untransformed data and do the usual regression diagnostics, including an evaluation of the residuals. $\endgroup$ – Robert Long Feb 1 at 15:52

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.