# identity, no transformation
model <- lm(Sepal.Length ~ Species, data = iris)
find_transformation(model)
# log-transformation
model <- lm(log(Sepal.Length) ~ Species, data = iris)
find_transformation(model)
# log+2
model <- lm(log(Sepal.Length + 2) ~ Species, data = iris)
find_transformation(model)
# inverse, response provided as character string
find_transformation("1 / y")
Run the code above in your browser using DataLab