Skip to content
Prev 149923 / 398498 Next

shapiro wilk normality test

For those people who feel the need for a p-value to test normality on large sample sizes, I propose the following test/function:

SnowsPenultimateNormalityTest <- function(x){

        # the following function works for current implementations of R
        # to my knowledge, eventually it may need to be expanded
        is.rational <- function(x){
                rep( TRUE, length(x) )
        }

        tmp.p <- if( any(is.rational(x))) {
                0
        } else {
                # current implementation will not get here
                # this part is reserved for the ultimate test
                1
        }

        out <- list(
                p.value = tmp.p,
                alternative = strwrap(paste('The data does not come from a',
        'strict normal distribution (but may represent a distribution',
        'that is close enough)'), prefix="\n\t"),
                method = "Snow's Penultimate Normality Test",
                data.name = deparse(substitute(x))
        )

        class(out) <- 'htest'
        out
}


Now that the need for a p-value is satisfied, we can get onto the more useful questions mentioned in this thread and other places.

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
(801) 408-8111