# Box-Cox transformation of dependent variable only

The function powerTranform from the "car" package in R mentions the following code for Box-Cox transformation for multiple regression:

summary(p1 <- powerTransform(cycles ~ len + amp + load, Wool))
# fit linear model with transformed response:
coef(p1, round=TRUE)
summary(m1 <- lm(bcPower(cycles, p1$roundlam) ~ len + amp + load, Wool))  Is it sensible to apply Box-Cox method to just the dependent variable (and not the whole formula) and proceed with the regression: library(fifer) cycles = boxcoxR(cycles) summary(m1 <- lm(cycles ~ len + amp + load, Wool))  I suspect this method is not right but I am not sure. • It is possible, of course (if it is sensible is another question). The function powerTransform from the car package accepts a single vector. So you could use p1 <- powerTransform(cycles) and then use bcPower(cycles, p1$roundlam) to perform the transformation. Then proceed with the regression as usual. – COOLSerdash May 5 '15 at 18:43
• @Irish Another explicit purpose of this family of transformations is to help linearize relationships. At least Tukey claimed as much. Plausibly, it could be used with predictor series for that purpose. – whuber May 6 '15 at 0:14
• @IrishStat While Box and Cox (1964) does largely focus on transformation of DVs, this would be expected, since (as Box&Cox mentions) Box and Tidwell (1962) address transformation of IVs. In addition, section 8 of Box&Cox does discuss simultaneous transformation of both y and the x's. So while the prime focus of the Box&Cox paper itself is on tranformation of IVs I think it's too strong to state it was never intended to relate to independent variables. If we then add Tukey's work on simultaneous transformations of both (where he also includes log as the '0th power'), ...(ctd) – Glen_b May 6 '15 at 0:57
• @IrishStat I don't dispute your evaluation of it; they're frequently overused and like any model selection process there are biases introduced by trying to optimize them. In general transformations, if used at all, should be based on sounder ground (theoretical considerations, for example); if that's unavoidable, the impact of the selection process on inference needs to be properly accounted for. – Glen_b May 6 '15 at 1:28
• It is interesting that the original Box and Cox paper had two examples in which the eventual choices were logging and taking reciprocals respectively, both of which would have been evident to experienced analysts independently of the Box-Cox machinery.. I think that is the way to use it, as suggestive; taking the estimated power too literally and using e.g. 0.123 or -0.456 often leads to models that are hard to interpret and fits that can't be reproduced on similar data. (I set aside fitting power laws $y = ax^b$ where taking logarithms is usually natural as a way to estimate parameters.) – Nick Cox May 6 '15 at 7:40

• @Irish I cannot recognize the data in your analysis beginning at p. 14. In particular, your plot of annual SD vs. annual mean on p. 15 doesn't look remotely consistent with the data shown on the preceding page. (The plot you describe on p. 15, as I understand it, can be produced in R with the commands x <- matrix(AirPassengers, 12); plot(colMeans(x), apply(x, 2, sd))) – whuber May 6 '15 at 17:25