If you take the example from the documentation and add log() around variables, it works fine with logs around the regressors but will not work with a log around the dependent variable. E.g. lm1 <- lm(mpg ~ log(hp), data = mtcars) works but lm1 <- lm( log(mpg) ~ log(hp), data = mtcars) will give the error
Error in names(object) <- nm :
'names' attribute [2] must be the same length as the vector [1]
If you take the example from the documentation and add log() around variables, it works fine with logs around the regressors but will not work with a log around the dependent variable. E.g.
lm1 <- lm(mpg ~ log(hp), data = mtcars)
works butlm1 <- lm( log(mpg) ~ log(hp), data = mtcars)
will give the error