Performing Yeo-Johnson transformations
The Yeo-Johnson transformation is an extension of the Box-Cox transformation that is no longer constrained to positive values. In other words, the Yeo-Johnson transformation can be used on variables with zero and negative values, as well as positive values. These transformations are defined as follows:
- ; if λ ≠ 0 and X >= 0
- ln(X + 1 ); if λ = 0 and X >= 0
- ; if λ ≠ 2 and X < 0
- -ln(-X + 1); if λ = 2 and X < 0
When the variable has only positive values, then the Yeo-Johnson transformation is like the Box-Cox transformation of the variable plus one. If the variable has only negative values, then the Yeo-Johnson transformation is like the Box-Cox transformation of the negative of the variable plus one, at the power of 2- λ. If the variable has a mix of positive and negative values, the Yeo-Johnson transformation applies different powers to the positive and negative values...