Yeo-Johnson and Logarithmic transformation
1
0
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?

R transformation Yeo-Johnson logarithm statistics • 3.2k views
ADD COMMENT
1
Entering edit mode

I'm not sure, but I guess your question would be more appropriate on https://stats.stackexchange.com/

ADD REPLY
1
Entering edit mode

I think you're confusing it with the Box-Cox transformation. Look at the Wikipedia page on power transform to see the differences.

ADD REPLY
3
Entering edit mode
6.6 years ago

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)

Screen_Shot_2018_05_04_at_16_12_37

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

ADD COMMENT
1
Entering edit mode

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)

ADD REPLY

Login before adding your answer.

Traffic: 1656 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6