# Transforming dependent and independent variables with different techniques

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.

• 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 Commented Aug 10, 2020 at 5:34
• See stats.stackexchange.com/a/35717/919 for a detailed example of how and why one might choose two different transformations.
– whuber
Commented Aug 10, 2020 at 14:31
• @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. Commented Aug 10, 2020 at 18:46
• Again, why do you care what the distribution looks like? What's "better" to you and what makes it better? Commented Aug 11, 2020 at 0:10
• 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. Commented Aug 11, 2020 at 8:52

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.