Learn R Programming

MASSExtra (version 1.2.2)

box_cox: Box-cox constructor function

Description

A front-end to boxcox with slicker display and better defaults

Usage

box_cox(object, ...)

# S4 method for formula box_cox(object, data = sys.parent(), ...)

# S4 method for lm box_cox(object, ..., plotit, flap = 0.4)

# S3 method for box_cox plot( x, ..., las = 1, xlab = expression(lambda), ylab, col.lines = "steel blue" )

# S3 method for box_cox print( x, ..., las = 1, xlab = expression(lambda), ylab, col.lines = "steel blue" )

Value

an object of class "box_cox"

Arguments

object

either a "box_cox" object, a formula,data pair, a linear model object or an xy-lixt

...

additional arguments passed on to methods

data

a data frame or environment

plotit

currently ignored. Plotting is done by plot or print methods

flap

fraction of the central 95% notional confidence to expand the range of lambda for the display

x

a "box_cox" object to be displayed

xlab, ylab, las

as for plot

col.lines

colour to use for indicator lines in the display

Examples

Run this code
box_cox(MPG.city ~ Weight, Cars93)

Run the code above in your browser using DataLab