[R] shapiro wilk normality test

Frank E Harrell Jr f.harrell at vanderbilt.edu
Sun Jul 13 15:29:13 CEST 2008


Marta Colombo wrote:
> Hi! 
> Well, if you look at the output:
> shapiro.test(rnorm(5000))
>> Â  Â  Â  Â  Shapiro-Wilk normality test
>>
>> data:Â  rnorm(5000)
>> W = 0.9997, p-value = 0.6205
> 
> You can see that the p-value is 0.6205 so you can't refuse the normality hypotesis. 
> H0: normal data    vs H1: not normal
> So shapiro.wilk test is saying that your data are normal and it's correct!
> Bye
> Marta

A large P-value means nothing more than needing more data.  No 
conclusion is possible.  Please read the classic paper Absence of 
Evidence is not Evidence for Absence.

Your first sentence is correct, but not the second.

Why test for normality?  What downstream method depends on it?  If 
normality is in doubt why not use a method that doesn't require it?

Frank Harrell

> 
> 
> ----- Messaggio originale -----
> Da: C.H. <chainsawtiney at gmail.com>
> A: "Bunny, lautloscrew.com" <bunny at lautloscrew.com>
> Cc: r-help at r-project.org
> Inviato: Domenica 13 luglio 2008, 7:27:43
> Oggetto: Re: [R] shapiro wilk normality test
> 
> You may consider the nortest package.
> 
> http://cran.r-project.org/web/packages/nortest/index.html
> 
> Regards,
> 
> CH
> 
> On Sat, Jul 12, 2008 at 11:30 PM, Bunny, lautloscrew.com
> <bunny at lautloscrew.com> wrote:
>> Hi everybody,
>>
>> somehow i dont get the shapiro wilk test for normality. i just can´t find
>> what the H0 is .
>>
>> i tried :
>>
>> Â  shapiro.test(rnorm(5000))
>>
>> Â  Â  Â  Â  Shapiro-Wilk normality test
>>
>> data:Â  rnorm(5000)
>> W = 0.9997, p-value = 0.6205
>>
>>
>> If normality is the H0, the test says it´s probably not normal, doesn´t it ?
>>
>> 5000 is the biggest n allowed by the test...
>>
>> are there any other test ? ( i know qqnorm already ;)
>>
>> thanks in advance
>>
>> matthias
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University



More information about the R-help mailing list