Learn R Programming

mnt

The package mnt is designed to give users access to state of the art tests of multivariate normality. It accompanies the survey paper on goodness of fit tests of multivariate normality by Ebner, B. and Henze, N. (2020) Tests for multivariate normality -- a critical review with emphasis on weighted L2-statistics, that will appear in TEST. All of the described tests can be performed by functions provided in mnt.

Installation

You can install the released version of mnt from CRAN with:

install.packages("mnt")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("LBPy/mnt")

Example

This is a basic example on how to use the mnt package: We generate a multivariate data set X.data and perform the BHEP test of normality for the generated X.data and using the tuning parameter a=3. The significance level is alpha. Note that the critical values are simulated by a Monte Carlo method.

library(mnt)
X.data = MASS::mvrnorm(50,c(3,4,5),diag(3,3)) 
X.BHEP = test.BHEP(X.data,a=3,alpha=0.05) 
X.BHEP 
#> 
#> ------------------------------------------------------------------------- 
#> 
#>          Test for multivariate normality with the BHEP  teststatistic.
#> 
#> tuning parameter = 3  
#> BHEP  =  0.9514364  
#> critical value =   1.09841  (via monte carlo) 
#> 
#> 
#> -------------------------------------------------------------------------

The value of the test statistic can directly be computed by

BHEP(X.data,a=3)                       
#> [1] 0.9514364

This also works in the univariate case:

X.data = stats::rnorm(25,3,5)
X.BHEP = test.BHEP(X.data,a=2,alpha=0.05) 
BHEP(X.data,a=2)     
X.BHEP 
#> 
#> ------------------------------------------------------------------------- 
#> 
#>          Test for multivariate normality with the BHEP  teststatistic.
#> 
#> tuning parameter = 2  
#> BHEP  =  0.6427705  
#> critical value =   0.9922879  (via monte carlo) 
#> 
#> 
#> -------------------------------------------------------------------------

And for other test statistics too:

X.data = stats::rnorm(25,3,5)
X.DEHT = test.DEHT(X.data,a=2,alpha=0.05) 
DEHT(X.data,a=2)     
X.DEHT 
#> 
#> ------------------------------------------------------------------------- 
#> 
#>          Test for multivariate normality with the DEH based on harmonic oscillator  teststatistic.
#> 
#> tuning parameter = 2  
#> DEH based on harmonic oscillator  =  1.303027  
#> critical value =   1.464164  (via monte carlo) 
#> 
#> 
#> -------------------------------------------------------------------------

Copy Link

Version

Install

install.packages('mnt')

Monthly Downloads

164

Version

1.3

License

CC BY 4.0

Maintainer

Bruno Ebner

Last Published

July 31st, 2020

Functions in mnt (1.3)

HZ

Statistic of the Henze-Zirkler test
EHS

Statistic of the EHS test based on a multivariate Stein equation
MQ2

second statistic of Manzotti und Quiroz
HJG

Henze-Jim<U+00E9>nes-Gamero test statistic
CS

Statistic of the test of Cox and Small
BHEP

Statistic of the BHEP-test
KKurt

Koziols measure of multivariate sample kurtosis
MSkew

Mardias measure of multivariate sample skewness
Quantile09

Simulated empirical 90% quantiles of the tests contained in package mnt
MKurt

Mardias measure of multivariate sample kurtosis
MQ1

first statistic of Manzotti and Quiroz
MRSSkew

multivariate skewness of M<U+00F3>ri, Rohatgi and Sz<U+00E9>kely
Quantile095

Simulated empirical 95% quantiles of the tests contained in package mnt
HV

statistic of the Henze-Visagie test
HJM

statistic of the Henze-Jim<U+00E9>nes-Gamero-Meintanis test
cv.quan

Monte Carlo simulation of quantiles for normality tests
print.mnt

Print method for tests of multivariate normality
test.HJG

Henze-Jimenes-Gamero test of multivariate normality
test.HJM

Henze-Jimenes-Gamero-Meintanis test of multivariate normality
test.DEHU

Doerr-Ebner-Henze test of multivariate normality based on a double estimation in a PDE
DEHT

Statistic of the DEH test based on harmonic oscillator
DEHU

Statistic of the DEH test based on a double estimation in PDE
MAKurt

multivariate kurtosis in the sense of Malkovich and Afifi
test.EHS

Ebner-Henze-Strieder test of multivariate normality based on Fourier methods in a multivariate Stein equation
test.DEHT

Doerr-Ebner-Henze test of multivariate normality based on harmonic oscillator
test.CS

multivariate normality test of Cox and Small
test.MRSSkew

Test of multivariate normality based on the measure of multivariate skewness of Mori, Rohatgi and Szekely
test.MASkew

Test of normality based on multivariate skewness in the sense of Malkovich and Afifi
test.MKurt

Test of normality based on Mardias measure of multivariate sample kurtosis
MASkew

multivariate skewness in the sense of Malkovich and Afifi
test.PU

Pudelko test of multivariate normality
test.MSkew

Test of normality based on Mardias measure of multivariate sample skewness
test.HV

The Henze-Visagie test of multivariate normality
Quantile099

Simulated empirical 99% quantiles of the tests contained in package mnt
PU

Statistic of the Pudelko test
test.HZ

The Henze-Zirkler test
test.SR

Szekely-Rizzo (energy) test
SR

statistic of the Sz<U+00E9>kely-Rizzo test
test.BHEP

Baringhaus-Henze-Epps-Pulley (BHEP) test
test.KKurt

Test of normality based on Koziols measure of multivariate sample kurtosis
standard

Empirical scaled residuals
test.MQ1

Manzotti-Quiroz test 1
test.MAKurt

Test of normality based on multivariate kurtosis in the sense of Malkovich and Afifi
test.MQ2

Manzotti-Quiroz test 2