StatCharrms (version 0.90.96)

wilksTest: Performs the Shapiro-Wilks test.

Description

Performs the Shapiro-Wilks test for normality on a set of residuals from an analysis. This is a wrapper function for the shapiro.test function with additional evaluation statistics.

Usage

wilksTest(Residuals)

Arguments

Residuals

Residuals from an analysis.

Value

WilksTest, a data frame containing:

OBS

Total number of observation.

STD

The standard error.

SKEW

The skew of the data set.

KURT

The measure of kurtosis (how heavy tailed the distribution is) of the data set.

SW_STAT

The Shapiro-Wilks test statistic.

P_VALUE

The p-Value for the test statistic.

Signif

The flag for p-values less then 0.01.

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) Remark AS R94: A remark on Algorithm AS 181: The W test for normality. Applied Statistics, 44: 547-551. Johnson, NL, Kotz, S, Balakrishnan N (1994) Continuous Univariate Distributions, Vol 1, 2nd Edition Wiley ISBN 0-471-58495-9.

Examples

Run this code
# NOT RUN {
	#Data 
		data(lengthWeightData)
	#Subset the data
		SubData<-lengthWeightData[lengthWeightData$Age=='16 week', ] 
		SubData<-SubData[SubData$Generation=='F1', ]
		SubData<-SubData[SubData$SEX=='M', ]
	#Run 
		Residuals<-aov(WEIGHT~Treatment,SubData)$residuals
		wilksTest(Residuals)
# }

Run the code above in your browser using DataCamp Workspace