Learn R Programming

MASSExtra (version 1.2.2)

lambda: Find the box-cox transform exponent estimate

Description

Estimates the box-cox power transformation appropriate for a linear model

Usage

lambda(bc, ...)

# S3 method for formula lambda(bc, data = sys.parent(), ..., span = 5)

# S3 method for lm lambda(bc, ..., span = 5)

# S3 method for box_cox lambda(bc, ..., span = 5)

# S3 method for default lambda(bc, ...)

Value

numeric: the maximum likelihood estimate of the exponent

Arguments

bc

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

...

additional parameters passed on to box_cox

data

a data frame or envinonment

span

integer: how many steps on either side of the maximum to use for the quadratic interpolation to find the maximum

Examples

Run this code
lambda(medv ~ ., Boston, span = 10)

Run the code above in your browser using DataLab