lambda: Find the box-cox transform exponent estimate

Description Usage Arguments Value Examples

View source: R/box_cox.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
lambda(bc, ...)

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

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

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

## Default S3 method:
lambda(bc, ...)

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

Value

numeric: the maximum likelihood estimate of the exponent

Examples

1
lambda(medv ~ ., Boston, span = 10)

BillVenables/WWRUtilities documentation built on Jan. 26, 2021, 10:18 p.m.