gg_boxcox: Compute and draw Box-Cox transformation plot for linear...

View source: R/gg_boxcox.R

gg_boxcoxR Documentation

Compute and draw Box-Cox transformation plot for linear models using ggplot2

Description

A forked version of MASS::boxcox using ggplot2

Usage

gg_boxcox(object, ...)

Arguments

object

a formula or fitted model object. Currently only lm and aov objects are handled.

...

additional parameters to be used in the model fitting.

lambda

vector of values of lambda – default (-2, 2) in steps of 0.1

interp

logical which controls whether spline interpolation is used. Default to TRUE if plotting with lambda of length less than 100.

eps

Tolerance for lambda = 0; defaults to 0.02

xlab

defaults to "lambda"

ylab

defaults to "log-Likelihood"

Value

a ggplot object

See Also

boxcox

Examples

gg_boxcox(Volume ~ log(Height) + log(Girth), data = trees,
          lambda = seq(-0.25, 0.25, length = 10))

oucru-biostats/C306 documentation built on July 16, 2024, 2:33 p.m.