Description Usage Arguments Details Value Author(s) References See Also Examples
A generalization of Shapiro-Wilk test for multivariate normality (Villasenor-Alva and Gonzalez-Estrada, 2009).
1 |
X |
a numeric data matrix with d columns and n rows. |
Sample size (n) must be larger than vector dimension (d).
When d = 1, mvshapiro_test(X)
produces the same results as shapiro.test(X)
.
A list with class "htest"
containing the following components.
statistic |
the value of the generalized Shapiro-Wilk statistic for testing multivariate normality. |
p.value |
an approximated p-value of the test. |
method |
the character string "Generalized Shapiro-Wilk test for multivariate normality". |
data.name |
a character string giving the name of the data set. |
Elizabeth Gonzalez-Estrada egonzalez@colpos.mx, Jose A. Villasenor-Alva
Villasenor-Alva, J.A. and Gonzalez-Estrada, E. (2009). A generalization of Shapiro-Wilk's test for multivariate normality. Communications in Statistics: Theory and Methods, 38 11, 1870-1883. http://dx.doi.org/10.1080/03610920802474465
shapiro.test
and normal_test
for testing univariate normality.
1 2 3 4 5 6 7 8 9 10 11 12 | # Example 1: Testing multivariate normality on iris.virginica
# iris.virginica contains a set of measurements corresponding to
# Iris virginica of famous iris data set.
iris.virginica <- as.matrix(iris[iris$Species == "virginica", 1:4], ncol = 4)
mvshapiro_test(iris.virginica)
# Example 2: Testing multivariate normality on the goats dataset
data(goats)
mvshapiro_test(as.matrix(goats))
|
Loading required package: fitdistrplus
Loading required package: MASS
Loading required package: survival
Loading required package: npsurv
Loading required package: lsei
Generalized Shapiro-Wilk test for Multivariate Normality
data: iris.virginica
MVW = 0.98521, p-value = 0.9652
Generalized Shapiro-Wilk test for Multivariate Normality
data: as.matrix(goats)
MVW = 0.96649, p-value = 0.01684
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.