I am learning how to transform and standardize data for building more precise models. I did not find any information if it is legit to transform independent variables with one technique (for instance, Box-Cox) and the dependent variable with a help of log transformation. Appreciate any tips.

My current situation - two independent variables looks much better with Box-Cox and the dependent variable looks much better after log transformation.

  • 4
    $\begingroup$ Why do you care what the IVs or DVs 'look' like? The main reason to transform is to get a linear model. A secondary reason would be to stabilize variance. A tertiary reason would be to meet the distributional assumption of tests or intervals, but that assumption doesn't directly relate to the marginal distribution of any of the variables, only the conditional distribution of the response $\endgroup$ – Glen_b Aug 10 '20 at 5:34
  • 1
    $\begingroup$ See stats.stackexchange.com/a/35717/919 for a detailed example of how and why one might choose two different transformations. $\endgroup$ – whuber Aug 10 '20 at 14:31
  • $\begingroup$ @Glen_b, thanks, that is what I am trying to do. To transform it and follow the assumptions. As far as I understand, I need to make the relationship linear and I am trying to do it with the help of transformation. After transformation my variables look better in terms of distribution. $\endgroup$ – Anakin Skywalker Aug 10 '20 at 18:46
  • 2
    $\begingroup$ Again, why do you care what the distribution looks like? What's "better" to you and what makes it better? $\endgroup$ – Glen_b Aug 11 '20 at 0:10
  • 1
    $\begingroup$ I was not asking rhetorically (either of the times I asked that), but to elicit an answer -- to try to identify what exact notion you carried; it's easier to explain why a conception is mistaken if I understand what that conception actually is, rather than just its consequences. $\endgroup$ – Glen_b Aug 11 '20 at 8:52

There are indeed data-informed ways to transform the independent variables; however, they seem to have become a bit more obscure.

You can indeed investigate using a Box-Cox transformation for your dependent variable. For the independent variables, the similar procedure is a Box-Tidwell transform. In $R$, the car package has a box.tidwell() method.

Alternately, you consult one of two excellent references to determine how to explore the transformation yourself. Either Fox's Applied Regression or Weisberg's Applied Linear Regression, 2nd Edition have information on Box-Tidwell. Note that later editions of Weisberg do not have the material on the Box-Tidwell transformation.

  • $\begingroup$ Kurtosis, cool nickname :) Thanks, I am working in Python, I will check it! $\endgroup$ – Anakin Skywalker Aug 10 '20 at 4:38

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.