boxCox() applies the Box-Cox transformation to a numeric vector.
boxCoxInv() reverses the transformation.
Details
The Box-Cox transformation is defined for strictly positive values of
x and is given by
$$ f_\lambda(x) = \left\{ \begin{array}{ll} (x^\lambda - 1) / \lambda & \mbox{if } \lambda \neq 0 \\ \log(x) & \mbox{if } \lambda = 0 \end{array} \right. $$
The transformation requires strictly positive input values. If
|lambda| < tol, the logarithmic transformation is used instead
for numerical stability.
The inverse transformation recovers the original data (up to numerical
precision) when the same lambda and tol are used.
References
Box, G. E. P. and Cox, D. R. (1964). An analysis of transformations. Journal of the Royal Statistical Society, Series B, 26(2), 211–252.
See also
Other transform:
boxCoxLambda(),
logSt(),
scaleX(),
yeoJohnson()
