Description Usage Arguments Details Value Note Author(s) References See Also Examples
This function implements the Henze-Zirkler test for assessing multivariate normality.
1 |
data |
A numeric matrix or data frame |
qqplot |
if |
Calculates the value of the Henze-Zirkler test and the approximate p-value.
HZ |
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 |
The printing method and plotting are in part adapted from R package MVN
(Korkmaz, S. et al., 2015, version 4.0).
Rashid Makarov, Vassilly Voinov, Natalya Pya
Henze, N. and Zirkler, B. (1990). A class of invariant consistent tests for multivariate normality. Communications in Statistics-Theory and Methods, 19, 3595-3617
S2.test
, DH.test
,
AD.test
, CM.test
,
R.test
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 <- HZ.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 <- HZ.test(dat)
res1
data(iris)
setosa = iris[1:50, 1:4] # Iris data only for setosa
res2 <- HZ.test(setosa, qqplot = TRUE)
res2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.