Description Usage Arguments Details Value Note Author(s) References See Also Examples
BoxCox()
returns a transformation of the input variable using a Box-Cox transformation.
BoxCoxInv()
reverses the transformation.
1 2 |
x |
a numeric vector |
lambda |
transformation parameter |
The Box-Cox transformation is given by
f(x;λ)=(x^λ - 1)/λ, if λ not 0, log(x), otherwise
a numeric vector of the same length as x.
These two functions are borrowed from library(forecast)
.
Rob J Hyndman <rob.hyndman@monash.edu>
Box, G. E. P. and Cox, D. R. (1964) An analysis of transformations. JRSS B 26 211–246.
Use BoxCoxLambda
or boxcox
in library(MASS)
to find optimal lambda values.
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.