mhz {mvnormalTest} | R Documentation |
Henze-Zirkler Test for Multivariate Normality
Description
It computes a multiviariate normality test based on a non-negative functional distance which was proposed by Henze and Zirkler (1990). Under the null hypothesis the test statistic is approximately log-normally distributed.
Usage
mhz(X)
Arguments
X |
an |
Value
Returns a list with two objects:
mv.test
results of the Henze-Zirkler test, i.e., test statistic, p-value, and multivariate normality summary (YES, if p-value>0.05).
uv.shapiro
a dataframe with
p
rows detailing univariate Shapiro-Wilk tests. Columns in the dataframe contain test statistics W, p-value,and univariate normality summary (YES, if p-value>0.05).
References
Henze, N., & Zirkler, B. (1990). A class of invariant consistent tests for multivariate normality. Communications in statistics-Theory and Methods, 19(10), 3595-3617.
Shapiro, S. S., & Wilk, M. B. (1965). An analysis of variance test for normality (complete samples). Biometrika, 52(3/4), 591-611.
Zhou, M., & Shao, Y. (2014). A powerful test for multivariate normality. Journal of applied statistics, 41(2), 351-363.
See Also
power.mhz
, mvnTest
, faTest
, msw
, msk
, mardia
, mvn
Examples
set.seed(12345)
## Data from gamma distribution
X = matrix(rgamma(50*4,shape = 2),50)
mhz(X)
## Data from normal distribution
X = matrix(rnorm(50*4,mean = 2 , sd = 1),50)
mhz(X)
## load the ubiquitous multivariate iris data ##
## (first 50 observations of columns 1:4) ##
iris.df = iris[1:50, 1:4]
mhz(iris.df)