Performs the Shapiro-Wilk test of normality.
shapiro.test(x)
a numeric vector of data values. Missing values are allowed, but the number of non-missing values must be between 3 and 5000.
A list with class "htest"
containing the following components:
the value of the Shapiro-Wilk statistic.
an approximate p-value for the test. This is
said in Royston (1995) to be adequate for p.value < 0.1
.
the character string "Shapiro-Wilk normality test"
.
a character string giving the name(s) of the data.
Patrick Royston (1982).
An extension of Shapiro and Wilk's
Patrick Royston (1982).
Algorithm AS 181: The
Patrick Royston (1995).
Remark AS R94: A remark on Algorithm AS 181: The
qqnorm
for producing a normal quantile-quantile plot.
# NOT RUN {
shapiro.test(rnorm(100, mean = 5, sd = 3))
shapiro.test(runif(100, min = 2, max = 4))
# }
Run the code above in your browser using DataLab