Displaying 1 result from an estimated 1 matches for "xtrans1".
Did you mean:
xtrans
2010 May 16
2
Box-Cox Transformation: Drastic differences when varying added constants
...omething fundmental missing in my current thinking about
box-cox...
Best,
Holger
P.S. Here is what i did:
# Creating of a skewed variable X (mixture of two normals)
x1 = rnorm(120,0,.5)
x2 = rnorm(40,2.5,2)
X = c(x1,x2)
# Adding a small constant
Xnew1 = X +abs(min(X))+ .1
box.cox.powers(Xnew1)
Xtrans1 = Xnew1^.2682 #(the value of the lambda estimate)
# Adding a larger constant
Xnew2 = X +abs(min(X)) + 1
box.cox.powers(Xnew2)
Xtrans2 = Xnew2^-.2543 #(the value of the lambda estimate)
#Plotting it all
par(mfrow=c(3,2))
hist(X)
qqnorm(X)
qqline(X,lty=2)
hist(Xtrans1)
qqnorm(Xtrans1)
qqli...