powered by
Plot boxcox graph in ggplot with suggested lambda transformation
gg_boxcox(fitted.lm, showlambda = TRUE, lambdaSF = 3, scale.factor = 0.5)
A ggplot object that contains boxcox graph
a fitted linear model (i.e. lm, glm) that contains fitted regression
logical; controls whether lambda value should be displayed on graph. Defaults to TRUE
numeric; controls to how many significant figure is lambda rounded to. Defaults to 3.
numeric; scales the point size and linewidth to allow customized viewing. Defaults to 0.5.
library(MASS) data(Cars93) cars_lm <- lm(Price ~ Passengers + Length + RPM, data = Cars93) gg_boxcox(cars_lm)
Run the code above in your browser using DataLab