BHEP: Statistic of the BHEP-test

Description Usage Arguments Details Value References Examples

View source: R/teststatistics.R

Description

This function returns the value of the statistic of the Baringhaus-Henze-Epps-Pulley (BHEP) test as in Henze and Wagner (1997).

Usage

1
BHEP(data, a = 1)

Arguments

data

a n x d matrix of d dimensional data vectors.

a

positive numeric number (tuning parameter).

Details

The test statistic is

BHEP_{n,β}=\frac{1}{n} ∑_{j,k=1}^n \exp≤ft(-\frac{β^2\|Y_{n,j}-Y_{n,k}\|^2}{2}\right)- \frac{2}{(1+β^2)^{d/2}} ∑_{j=1}^n \exp≤ft(- \frac{β^2\|Y_{n,j}\|^2}{2(1+β^2)} \right) + \frac{n}{(1+2β^2)^{d/2}}.

Here, Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n), j=1,…,n, are the scaled residuals, \overline{X}_n is the sample mean and S_n is the sample covariance matrix of the random vectors X_1,…,X_n. To ensure that the computation works properly n ≥ d+1 is needed. If that is not the case the function returns an error.

Value

value of the test statistic.

References

Henze, N., and Wagner, T. (1997), A new approach to the class of BHEP tests for multivariate normality, J. Multiv. Anal., 62:1–23, DOI

Epps T.W., Pulley L.B. (1983), A test for normality based on the empirical characteristic function, Biometrika, 70:723-726, DOI

Examples

1
BHEP(MASS::mvrnorm(50,c(0,1),diag(1,2)))

mnt documentation built on July 31, 2020, 5:07 p.m.

Related to BHEP in mnt...