Doornik-Hansen test for Multivariate Normality

Description

This function implements the Doornik-Hansen test for assessing multivariate normality.

Usage

1

Arguments

data

A numeric matrix or data frame

qqplot

if TRUE creates a chi-square Q-Q plot

Details

Calculates the value of the Doornik-Hansen test and the approximate p-value.

Value

DH

the value of the test statistic

p.value

the p-value of the test

data.name

a character string giving the name of the data

Note

The printing method and plotting are in part adapted from R package MVN (version 4.0, Korkmaz, S. et al., 2015).

Author(s)

Rashid Makarov, Vassilly Voinov, Natalya Pya

References

Doornik, J. and Hansen, H. (2008). An omnibus test for univariate and multivariate normality. Oxford Bulletin of Economics and Statistics, 70, 915-925.

See Also

S2.test, AD.test, CM.test, R.test, HZ.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## generating n bivariate normal random variables...       
dat <- rmvnorm(n=200,mean=rep(0,2),sigma=matrix(c(4,2,2,4),2,2)) 
res <- DH.test(dat)
res
## generating n bivariate t distributed with 10df random variables...       
dat <- rmvt(n=200,sigma=matrix(c(4,2,2,4),2,2)*.8,df=10,delta=rep(0,2)) 
res1 <- DH.test(dat)
res1

data(iris)
setosa <- iris[1:50, 1:4] # Iris data only for setosa
res2 <- DH.test(setosa, qqplot = TRUE)
res2