I understand how to use the box cox transformation in R and how to get the graph and lambda.
These are the things that are confusing me. For simplicity assume this example:
Weight = Gender + Height + Age + Income
gender = categorical variable 1 = male, 0 = female
continuous variables - weight, height, age, income.
I've done:
model = lm(weight ~ gender + height + age + income)
and applied box-cox to this model which is about 1 so no transformation is needed for weight.
The questions are:
- How do I apply Box-Cox to the 'x' variables to see if they need to be transformed (I read they can be applied to all x variables, the only disadvantage is its time consuming, but this isn't an issue for me).
- How do I know if they need a transformation for sure e.g. if lambda is 0.4 should I use a square root transformation or does it 'have' to be 0.5? what is lambda is 2?
- If one or two or all variables need a transformation then how do I adjust the main model formula?