Question: Yeo-Johnson and Logarithmic transformation
0
gravatar for rednalf
15 months ago by
rednalf50
rednalf50 wrote:

Is a Yeo-Johnson transformation using a lambda equal to 0 the same transformation as a logarithmic transformation?

ADD COMMENTlink modified 15 months ago by Kevin Blighe46k • written 15 months ago by rednalf50
1

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

ADD REPLYlink written 15 months ago by WouterDeCoster40k
1

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

ADD REPLYlink written 15 months ago by Jean-Karim Heriche20k
3
gravatar for Kevin Blighe
15 months ago by
Kevin Blighe46k
Kevin Blighe46k wrote:

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 COMMENTlink written 15 months ago by Kevin Blighe46k
1

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 REPLYlink written 15 months ago by Jean-Karim Heriche20k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1858 users visited in the last hour