Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bc

Box-Cox transform


Description

Compute the box-cox transform of a vector of values, handling the region near lambda = 0 with some care

Usage

bc(y, lambda, eps = 1e-04)

Arguments

y

numeric, the original observations

lambda

numeric, the box-cox power

eps

numeric, a guard aroung lambda = 0

Value

A vector of transformed quantities

Examples

plot(12:50, bc(12:50, -1), type = "l", xlab = "MPG", ylab = "bc(MPG, -1)",
     las = 1, col = "sky blue", panel.first = grid())
points(bc(MPG.city, -1) ~ MPG.city, data = Cars93, pch = 16, cex = 0.7)

MASSExtra

Some 'MASS' Enhancements

v1.1.2
GPL-2 | GPL-3
Authors
Bill Venables
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.