The following is the table of Lambda values that describe what the resulting dataset would look like after a Box Cox transformation:
What is the equivalent table for Yeo Johnson's lambda values? Cant seem to find it online.
The following is the table of Lambda values that describe what the resulting dataset would look like after a Box Cox transformation:
What is the equivalent table for Yeo Johnson's lambda values? Cant seem to find it online.
A table adds little, but a picture can add a lot more to our understanding. I offer two pictures.
Unlike the Box-Cox transformation, which applies to positive numbers, the Yeo-Johnson transformation applies to all numbers. It does so by splitting the real line at zero, shifting the positive values by $1$ and the negative values by $-1,$ and applying a Box-Cox transformation to the absolute values, negating them when the argument is negative. In effect, it sews two Box-Cox transformations together. However, they have "inverse" Box-Cox parameters. The natural origin of the Box-Cox parameters is $\lambda = 1$ and the "inverse" parameter is
$$\lambda^\prime = 2 - \lambda,$$
reflecting the parameter line around $\lambda = 1.$ The sewing is smooth (as you will see in the first plot below) because all Box-Cox transformations are by design made to agree with the identity transformation at $x = 1.$
For pictures of the Box-Cox transformations and some explanation of their construction, see https://stats.stackexchange.com/a/467525/919. These transformations are given by
$$\operatorname{BC}(x;\lambda) = \frac{x^\lambda - 1}{\lambda}$$
(which has the limiting value of $\log(x)$ when $\lambda = 0$). They can be inverted: when $y$ is the transformed value, the original $x$ is recovered by
$$\operatorname{BC}^{-1}(y;\lambda) = (1 + \lambda y)^{1/\lambda}$$
(limiting to the exponential function when $\lambda = 0$).
The Yeo-Johnson transformation is
$$\operatorname{YJ}(x;\lambda) = \left\{\begin{aligned}\operatorname{BC}(1+x,\lambda), && x \ge 0\\ -\operatorname{BC}(1-x, \lambda^\prime),&& x \lt 0.\end{aligned} \right.$$
These can all be inverted by inverting the positive and negative values separately.
The implementation in any programming language is thereby simple. In R, for instance, it is
BC <- function(x, lambda) ifelse(lambda != 0, (x^lambda - 1) / lambda, log(x))
YJ <- function(y, lambda) ifelse(y >= 0, BC(y + 1, lambda), -BC(1 - y, 2-lambda))
The graphs of $\operatorname{YJ}$ show the effects on the data for various $\lambda,$
Here's what they do to a reference (Normal) distribution (the green distribution for $\lambda = 1$ in the middle panel):
Like the Box-Cox family, these transformations make a distribution more positively skewed when $\lambda \gt 1$ and more negatively skewed when $\lambda \lt 1.$