Description Usage Arguments Details Value Author(s) References See Also Examples
A function to generate the Shapiro-Wilk's W statistic needed to feed the Royston's H test for multivariate normality
1 | royston.test(a)
|
a |
A numeric matrix or data frame |
If kurtosis of the data greater than 3 then Shapiro-Francia test is better for leptokurtic samples else Shapiro-Wilk test is better for platykurtic samples.
statistic |
the value of Royston's H statistic at significance level 0.05 |
p.value |
an approximate p-value for the test with respect to equivalent degrees of freedom (edf) |
Selcuk Korkmaz
Johnson, R.A. and Wichern, D. W. (1992). Applied Multivariate Statistical Analysis. 3rd. ed. New-Jersey:Prentice Hall.
Mecklin, C.J. and Mundfrom, D.J. (2005). A Monte Carlo comparison of the Type I and Type II error rates of tests of multivariate normality. Journal of Statistical Computation and Simulation, 75:93-107.
Royston, J.P. (1982). An Extension of Shapiro and Wilks W Test for Normality to Large Samples. Applied Statistics, 31(2):115124.
Royston, J.P. (1983). Some Techniques for Assessing Multivariate Normality Based on the Shapiro-Wilk W. Applied Statistics, 32(2).
Royston, J.P. (1992). Approximating the Shapiro-Wilk W-Test for non-normality. Statistics and Computing, 2:117-119.121133.
Royston, J.P. (1995). Remark AS R94: A remark on Algorithm AS 181: The W test for normality. Applied Statistics, 44:547-551.
Shapiro, S. and Wilk, M. (1965). An analysis of variance test for normality. Biometrika, 52:591611.
Trujillo-Ortiz, A., R. Hernandez-Walls, K. Barba-Rojo and L. Cupul-Magana. (2007). Roystest:Royston's Multivariate Normality Test. A MATLAB file. URL http://www.mathworks.com/matlabcentral/fileexchange/17811
shapiro.test
sf.test
kurtosis
mahalanobis
qqplot
qchisq
1 2 3 4 5 6 7 8 | a=iris[1:50,1:4] # Iris data only for setosa and four variables
royston.test(a) # Data analyzed have a non-normal distribution.
#Variable 4 (petal width) is markedly non-normal. So when take off that variable;
dev.new()
a=iris[1:50,1:3] # Iris data only for setosa and three variables
royston.test(a) # Data analyzed have a normal distribution.
|
The Royston's H test has been moved to 'MVN' package. 'royston'
package will no longer be supported. Please use 'MVN' package for
further analysis.
$H
[1] 31.51803
$p.value
[1] 2.187653e-06
$distribution
[1] "Data analyzed have a non-normal distribution."
$H
[1] 7.254588
$p.value
[1] 0.06025685
$distribution
[1] "Data analyzed have a normal distribution."
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.