[R] Shapiro-Wilk test

Ralf Goertz R.Goertz at psych.uni-frankfurt.de
Mon Jul 2 14:48:27 CEST 2001


Hi,

does the shapiro wilk test in R-1.3.0 work correctly? Maybe it does, but can 
anybody tell me why the following sample doesn't give "W = 1" and 
"p-value = 1":

R> x<-1:9/10;x
[1] 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
R> shapiro.test(qnorm(x))

        Shapiro-Wilk normality test

data:  qnorm(x) 
W = 0.9925, p-value = 0.9986 

I can't imagine a sample being more "normal" than this. Furthermore, the 
Kolmogorov-Smirnov test gives a p-value of 1.

R> ks.test(qnorm(x),"pnorm",mean=0,sd=1)

        One-sample Kolmogorov-Smirnov test

data:  qnorm(x) 
D = 0.1, p-value = 1 
alternative hypothesis: two.sided 

Can someone explain this please,

Ralf
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list