bc: Box-Cox transform

Description Usage Arguments Value Examples

View source: R/box_cox.R

Description

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

Usage

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

Arguments

y

numeric, the original observations

alpha

numeric, the box-cox power

eps

numeric, a guard aroung alpha = 0

Value

A vector of transformed quantities

Examples

1
2
3
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)

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