Learn R Programming

MVN (version 4.0)

hzTest: Henze-Zirkler's Multivariate Normality Test

Description

This function performs Henze-Zirkler's Multivariate Normality Test.

Usage

hzTest(data, cov = TRUE, qqplot = FALSE)

Arguments

data
a numeric matrix or data frame
cov
if TRUE covariance matrix is normalized by n, if FALSE it is normalized by n-1
qqplot
if TRUE it creates a chi-square Q-Q plot

Value

HZ
the value of Henze-Zirkler statistic at significance level 0.05
p-value
a p-value for the HZ test

Details

The Henze-Zirkler test is based on a non-negative functional distance that measures the distance between two distribution functions. If the data is multivariate normal, the test statistic HZ is approximately lognormally distributed. It proceeds to calculate the mean, variance and smoothness parameter. Then, mean and variance are lognormalized and the p-value is estimated.

References

Trujillo-Ortiz, A., R. Hernandez-Walls, K. Barba-Rojo and L. Cupul-Magana.(2007). HZmvntest:Henze-Zirkler's Multivariate Normality Test. A MATLAB file. URL http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=17931

Henze, N. and Zirkler, B. (1990), A Class of Invariant Consistent Tests for Multivariate Normality. Commun. Statist.-Theor. Meth., 19(10): 35953618. Henze, N. and Wagner, Th. (1997), A New Approach to the BHEP tests for multivariate normality. Journal of Multivariate Analysis, 62:1-23.

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. (2003), On Using Asymptotic Critical Values in Testing for Multivariate Normality. http://interstat.statjournals.net/YEAR/2003/articles/0301001.pdf

See Also

roystonTest mardiaTest mvnPlot mvOutlier uniPlot uniNorm

Examples

Run this code
setosa = iris[1:50, 1:4] # Iris data only for setosa and four variables
result = hzTest(setosa, qqplot = TRUE)
result

Run the code above in your browser using DataLab