shapiro.test(x)
x
must be less than 5000 after dropping nonfinite values.
"htest"
representing the result of the Shapiro-Wilk normality test. This object has the following components:
The calculations for this test are based on the algorithm by Royston (1995).
Shapiro and Wilk's W-statistic is a well-known goodness of fit test for the normal distribution. It is attractive because it has a simple, graphical interpretation: you can think of it as an approximate measure of the correlation in a normal quantile-quantile plot of the data.
Royston, P. (1995). A remark on algorithm AS 181: the W-test for normality. Applied Statistics 44: 547-551.
Shapiro, S.S. and Wilk, M.B. (1965). An analysis of variance test for normality (complete samples). Biometrika 52: 591-611.
# Should not be significant shapiro.test(rnorm(30)) # Should be significant. shapiro.test(runif(50))