powered by
Simple Box Cox, with no optimisation of lambda.
boxcox(x, lambda, makepos = TRUE, na.rm = FALSE)
A vector of length length(x) with transformed values.
length(x)
A vector or column of data to transform
The lambda parameter of the Box Cox transform
If TRUE (default) makes all values positive by subtracting the minimum and adding 1.
TRUE
If TRUE, NAs will be removed: only relevant if makepos = TRUE which invokes min().
NA
makepos = TRUE
min()
This function replaces the now-defunct BoxCox() from COINr < v1.0.
BoxCox()
# example data x <- runif(30) # Apply Box Cox xBox <- boxcox(x, lambda = 2) # plot one against the other plot(x, xBox)
Run the code above in your browser using DataLab