BoxCox transformation function
Description
BOXCOX(x,lambda,shift) calculates a Box-Cox transformation of x with parameters lambda and shift.
The argument x can be a single number or a matrix. When it is a matrix, the function returns a matrix with the same dimensions and with the BOXCOX transformation applied to all elements.
The shift parameter should not be 0 when x is larger than 0.
The Box-Cox transformation is defined as follows:
$$
y =
\begin{cases}
\dfrac{(x + shift)^{\lambda} - 1}{\lambda} & \text{if } \lambda \neq 0 \\\\
\ln (x + shift) & \text{if } \lambda = 0
\end{cases}
$$