[R] Help with the Shapiro Wilk normality test

Kenneth Cabrera krcabrer at epm.net.co
Tue Feb 22 05:57:15 CET 2000

```Hello:

I use this short program in SAS
____________________________________________________________________________
data test1;
input x @@;
cards;
1.00 1.70 2.13 2.13 2.03 2.50 2.00 2.87 2.40 2.20 1.47 1.70 1.70 1.50 1.80
1.03 0.63 0.60 1.87 1.13 1.10 1.27 0.83 0.67 1.73 2.23 2.50 1.60 1.97 2.17
2.10 0.90 0.80 2.23 0.10 0.43 0.83 0.10 0.40 0.60 1.67 1.13 1.53 1.47 0.67
0.50 1.03 1.33 1.73 1.27 0.90 1.70 2.17 0.70 0.90 0.70 1.07 0.23 0.57 0.90
0.67 1.30 1.03 0.33 0.70 1.47 1.53 1.07 0.60 0.40 0.27 1.53 1.43 2.13 0.87
1.13
;
run;
proc univariate data=test1 normal;
run;
_____________________________________________________________________________

And I obtain the following result for the Shapiro-Wilk's test

W:Normal   0.960439  Pr<W  0.0602

When I use the same data in R, with the following statement:

___________________________________________________________________________________

test1<-c(1.00,1.70,2.13,2.13,2.03,2.50,2.00,2.87,2.40,2.20,1.47,1.70,1.70,1.50,1.80,

1.03,0.63,0.60,1.87,1.13,1.10,1.27,0.83,0.67,1.73,2.23,2.50,1.60,1.97,2.17,
2.10,0.90,0.80,2.23,0.10,0.43,0.83,0.10,0.40,0.60,1.67,1.13,1.53,1.47,0.67,
0.50,1.03,1.33,1.73,1.27,0.90,1.70,2.17,0.70,0.90,0.70,1.07,0.23,0.57,0.90,
0.67,1.30,1.03,0.33,0.70,1.47,1.53,1.07,0.60,0.40,0.27,1.53,1.43,2.13,0.87,
1.13)
shapiro.test(test1)
____________________________________________________________________________________

Shapiro-Wilk normality test

data:  test1
W = 0.9733, p-value = 0.1083

The rest of the statistics are the same, mean, median, sd, etc.
But I don't understand the difference in the Shapiro-Wilk's test of
normality.

Thank you very much for your help.

Kenneth Cabrera
Universidad Nacional de Colombia, Sede Medellin
ICNE
Instituto de Ciencias Naturales y Ecologia
krcabrer at epm.net.co

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```