gg_boxcox | R Documentation |
Plot boxcox graph in ggplot with suggested lambda transformation
gg_boxcox(fitted.lm, showlambda = TRUE, lambdaSF = 3, scale.factor = 0.5)
fitted.lm |
a fitted linear model (i.e. lm, glm) that contains fitted regression |
showlambda |
logical; controls whether lambda value should be displayed on graph. Defaults to TRUE |
lambdaSF |
numeric; controls to how many significant figure is lambda rounded to. Defaults to 3. |
scale.factor |
numeric; scales the point size and linewidth to allow customized viewing. Defaults to 0.5. |
A ggplot object that contains boxcox graph
library(MASS)
data(Cars93)
cars_lm <- lm(Price ~ Passengers + Length + RPM, data = Cars93)
gg_boxcox(cars_lm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.