shapiro.test {stats}R Documentation

Shapiro-Wilk Normality Test

Description

Performs the Shapiro-Wilk test of normality.

Usage

shapiro.test(x)

Arguments

x a numeric vector of data values, the number of which must be between 3 and 5000. Missing values are allowed.

Value

A list with class "htest" containing the following components:

statistic the value of the Shapiro-Wilk statistic.
p.value the p-value for the test.
method the character string "Shapiro-Wilk normality test".
data.name a character string giving the name(s) of the data.

References

Patrick Royston (1982) An Extension of Shapiro and Wilk's W Test for Normality to Large Samples. Applied Statistics, 31, 115–124.

Patrick Royston (1982) Algorithm AS 181: The W Test for Normality. Applied Statistics, 31, 176–180.

Patrick Royston (1995) A Remark on Algorithm AS 181: The W Test for Normality. Applied Statistics, 44, 547–551.

See Also

qqnorm for producing a normal quantile-quantile plot.

Examples

shapiro.test(rnorm(100, mean = 5, sd = 3))
shapiro.test(runif(100, min = 2, max = 4))

[Package stats version 2.5.0 Index]