Learn R Programming

mnt (version 1.4)

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

Description

Performs the BHEP test of multivariate normality of Henze and Wagner (1997), with tuning parameter a. Critical values and p-values are obtained by Monte Carlo simulation or by fitting a Pearson or Johnson distribution to the first four moments of the limiting null distribution.

Usage

test.BHEP(
  data,
  a = 1,
  MC.rep = 10000,
  alpha = 0.05,
  cv.method = c("MC", "Pearson", "Johnson")
)

Value

An object of class "mnt", with components:

Test

Name of the test.

param

Value of the tuning parameter.

Test.value

Value of the test statistic.

cv

Approximated upper \(1-\alpha\) critical value.

Decision

TRUE if Test.value > cv, so the null hypothesis is rejected at the chosen significance level.

cv.method

Critical-value method actually used.

pvalue

Upper-tail p-value computed using the selected method. The Pearson and Johnson p-values are asymptotic approximations.

Arguments

data

A numeric \(n \times d\) matrix with observations in rows. A numeric vector is treated as a univariate sample. All entries must be finite, \(n \ge d+1\), and the sample covariance must be nonsingular.

a

Positive, finite tuning parameter; corresponds to \(\beta\) in the formulas below.

MC.rep

Positive integer giving the number of Monte Carlo replications. Used only when cv.method = "MC".

alpha

Significance level, strictly between zero and one.

cv.method

Method used to approximate the critical value: "MC" (default), "Pearson", or "Johnson". Partial matching is supported.

Details

The test statistic is $$ BHEP_{n,\beta} = \frac{1}{n}\sum_{j,k=1}^n \exp\left(-\frac{\beta^2\|Y_{n,j}-Y_{n,k}\|^2}{2}\right) - \frac{2}{(1+\beta^2)^{d/2}}\sum_{j=1}^n \exp\left(-\frac{\beta^2\|Y_{n,j}\|^2}{2(1+\beta^2)}\right) + \frac{n}{(1+2\beta^2)^{d/2}}. $$ Here \(\beta=a\), \(Y_{n,j}=S_n^{-1/2}(X_j-\overline{X}_n)\), and \(S_n=n^{-1}\sum_{j=1}^n (X_j-\overline{X}_n)(X_j-\overline{X}_n)^\top\).

With cv.method = "MC", cv.quan simulates the null distribution at the observed sample size \(n\) and dimension \(d\), using MC.rep replications. The same simulated statistics are used for the critical value and the Monte Carlo p-value $$p_{MC}=\frac{1+\sum_{b=1}^{B}\mathbf{1}\{T_b\ge T_{obs}\}}{B+1},$$ where \(B\) is MC.rep. The critical value retains the order-statistic convention of cv.quan, and Decision remains Test.value > cv. Because the Monte Carlo p-value is discrete and uses the plus-one correction, this decision can differ from pvalue <= alpha near the cutoff.

With cv.method = "Pearson" or "Johnson", the critical value is obtained from a moment-based approximation to the limiting null distribution \(T_\beta(d)\). Let \(\kappa_r\) denote its cumulants. The first three cumulants are given by Henze and Wagner (1997), and the fourth by Theorem 3.2 and Appendix A of Ebner and Henze's announced manuscript. The mean, variance, skewness and ordinary kurtosis are $$ \mu=\kappa_1,\quad \sigma^2=\kappa_2,\quad \gamma_1=\kappa_3/\kappa_2^{3/2},\quad \beta_2=3+\kappa_4/\kappa_2^2. $$ In particular, the fourth central moment is \(\mu_4=\kappa_4+3\kappa_2^2\); it is not the fourth cumulant.

References

Henze, N. and Wagner, T. (1997). A new approach to the BHEP tests for multivariate normality. Journal of Multivariate Analysis, 62, 1--23. tools:::Rd_expr_doi("10.1006/jmva.1997.1684").

Ebner, B. and Henze, N. Four-Moment Approximations and Fast p-Values for BHEP Tests of Multivariate Normality. Supplied manuscript BHEP_fourth_moment.pdf, Theorem 3.2 and Appendix A.

See Also

BHEP, cv.quan

Examples

Run this code
set.seed(123)
x <- matrix(rnorm(100), ncol = 2)
test.BHEP(x, MC.rep = 500)
if (requireNamespace("PearsonDS", quietly = TRUE)) {
  test.BHEP(x, cv.method = "Pearson")
}
if (requireNamespace("SuppDists", quietly = TRUE)) {
  test.BHEP(x, cv.method = "Johnson")
}

Run the code above in your browser using DataLab