BoxCox: Box Cox transformation

Description Usage Arguments Value See Also Examples

View source: R/coin_treat.R

Description

Simple Box Cox, with no optimisation of lambda. See COINr online documentation for more details.

Usage

1
BoxCox(x, lambda, makepos = TRUE)

Arguments

x

A vector or column of data to transform

lambda

The lambda parameter of the Box Cox transform

makepos

If TRUE (default) makes all values positive by subtracting the minimum and adding 1.

Value

A vector of length length(x) with transformed values.

See Also

Examples

1
2
3
4
5
6
# get a column of data with outliers
x <- ASEMIndData$Tariff
# Apply Box Cox
xBox <- BoxCox(x, lambda = 2)
# plot one against the other
plot(x, xBox)

COINr documentation built on Nov. 30, 2021, 9:06 a.m.