Entering edit mode
6.6 years ago
rednalf
▴
90
Is a Yeo-Johnson transformation using a lambda equal to 0 the same transformation as a logarithmic transformation?
Is a Yeo-Johnson transformation using a lambda equal to 0 the same transformation as a logarithmic transformation?
Greetings,
They are not the same. Here is the proof:
require(VGAM)
# Create random data
x <- matrix(rexp(200, rate=.1), ncol=40)
y0 <- yeo.johnson(x, lambda=0)
y1 <- yeo.johnson(x, lambda=1)
y2 <- yeo.johnson(x, lambda=2)
logged <- log(x)
par(mfrow=c(2,3)); hist(x); hist(y0); hist(y1); hist(y2); hist(logged)
mean(y0); sd(y0); range(y0)
[1] 2.02613
[1] 0.9372831
[1] 0.04263848 4.37854026
mean(logged); sd(logged); range(logged)
[1] 1.707483
[1] 1.379477
[1] -3.133603 4.365917
Kevin
An empirical proof is nice but a mathematical proof is better because you then understand what you're doing. In this case, a quick look at the formula on Wikipedia is enough to show that they can't be the same: for x >= 0, yeo.johnson(x, lambda=0) = log(x+1) != log(x)
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
I'm not sure, but I guess your question would be more appropriate on https://stats.stackexchange.com/
I think you're confusing it with the Box-Cox transformation. Look at the Wikipedia page on power transform to see the differences.