Solved – Shapiro test and transformation

I am playing with shapiro.test from R and checking for non-normality of error variance.

> shapiro.test(residuals(fit))          Shapiro-Wilk normality test  data:  residuals(fit)  W = 0.9525, p-value = 0.0003303  > shapiro.test(residuals( lm( sqrt(V1)~V2 ,data=market) ) )          Shapiro-Wilk normality test  data:  residuals(lm(sqrt(V1) ~ V2, data = market))  W = 0.8895, p-value = 5.89e-08  > shapiro.test(residuals( lm( log(V1)~V2 ,data=market) ) )          Shapiro-Wilk normality test  data:  residuals(lm(log(V1) ~ V2, data = market))  W = 0.7698, p-value = 1.95e-12  > shapiro.test(residuals( lm( 1/(V1) ~ V2 ,data=market) ) )          Shapiro-Wilk normality test  data:  residuals(lm(1/(V1) ~ V2, data = market))  W = 0.3954, p-value < 2.2e-16 

The p-value for normality test is <0.001. So I did a transformation on V1, log(Y), inverse(Y) and sqrt(Y) but their p-values gets even smaller. Does this mean that these transformations don't work? I also did a boxcox transformation, and I get p-value of 0.3. So in that case, boxcox is the best remedy only in this case? Or should I just use boxcox in the future for remedy of non-normality? The rest of the usual transformation methods are useless?

1) Why are you transforming the residuals?

2) why are you testing them for normality?

3) what do you mean by 'did a boxcar'? [Resolved]

4) what do the data look like? e.g. what does a QQ plot show?

Log, inverse and sqrt are all Box-Cox transformations (up to linear rescaling). Transformation may not be the best idea, but taking transformation as a given, rather than just throw transformations and data and hoping one sticks, find out what your data look like!

Similar Posts:

Rate this post

Leave a Comment