[R] How to run Shapiro-Wilk test for each grouped

Yvonnick Noel yvonnick.noel at uhb.fr
Tue Apr 13 13:06:52 CEST 2010


Iurie,
> Noel, thanks a lot. This will help me someday. But I have a question.
> When we run Shapiro-Wilk test, the homogenity of variances is a
> mandatory condition?
>   
No it is not. An homoscedasticity test only makes sense when you have a 
grouping factor, and a normality test may of course be used in a variety 
of contexts when you have a unique sample.

My point was: If you use gaussian models and assume homogeneity of 
within-group variances, then testing normality is somewhat simplified, 
since your model residuals are expected to be drawn from a unique normal 
distribution, and only one normality test on the residuals is necessary 
(no need for a loop).

Best wishes,

Yvonnick NOEL, PhD.
University of Brittany, Rennes 2
France



More information about the R-help mailing list