Calculates the Shapiro-Wilk test for Normality (R.W. Payne).
|What to print (
||Samples of data to be tested for Normality|
||Saves the Shapiro-Wilk W statistic for each sample|
||Saves the probability for W under the assumption that the data are Normal|
WSTATISTIC uses the Shapiro-Wilk test to assess whether a sample of data comes from a Normal distribution. The data values must be supplied, in a variate, using the
DATA parameter. By default
WSTATISTIC prints the statistic, W, with its probability value under the assumption that the data are Normal. (So a low probability indicates that the data are unlikely to be from a Normal distribution.) The printed output can be supressed by setting option
PRINT=*. The test statistic can be saved, in a scalar, using the
W parameter, and its probability can similarly be saved using the
WSTATISTIC calculates the statistic and its probability using the methods of Royston (1993, 1995).
DATA variate can be restricted to assess a subset of the data.
Royston, P. (1993). A toolkit for testing for non-normality in complete and censored samples. The Statistician, 42, 37-43.
Royston, P. (1995). A remark on Algorithm AS 181: the W-test for Normality. Applied Statistics, 44, 547-551.
Commands for: Basic and nonparametric statistics.
CAPTION 'WSTATISTIC example','Data from Royston (1995)'; STYLE=meta,plain VARIATE [VALUES=4.2,4.9,5.2,5.3,6.7,6.7,7.2,7.5,8.1,8.6,8.8,9.3,\ 9.5,10.3,10.8,11.1,12.2,12.5,13.3,15.1,15.3,16.1,19.0,19.5] Glucose WSTATISTIC Glucose