hw: Henze-Wagner High-Dimensional Test for Multivariate Normality

View source: R/hw.R

hwR Documentation

Henze-Wagner High-Dimensional Test for Multivariate Normality

Description

Performs the high-dimensional version of the BHEP test for multivariate normality as proposed by Henze and Wagner (1997). When the covariance matrix is singular (e.g., when p > n) a Moore-Penrose pseudoinverse is used.

Usage

hw(
  data,
  use_population = TRUE,
  tol = 1e-25,
  bootstrap = FALSE,
  B = 1000,
  cores = 1
)

Arguments

data

A numeric matrix or data frame with observations in rows and variables in columns.

use_population

Logical; if TRUE, uses the population covariance estimator \frac{n-1}{n} \times \Sigma; otherwise uses the sample covariance. Default is TRUE.

tol

Numeric tolerance passed to solve when inverting the covariance matrix. Default is 1e-25.

bootstrap

Logical; if TRUE, compute p-value via bootstrap resampling. Default is FALSE.

B

Integer; number of bootstrap replicates used when bootstrap = TRUE. Default is 1000.

cores

Integer; number of cores for parallel computation when bootstrap = TRUE. Default is 1.

Value

A data frame with one row containing the following columns: Test ("Henze-Wagner"), Statistic and p.value.

Examples

## Not run: 
data <- iris[1:50, 1:4]
hw_result <- hw(data)
hw_result

## End(Not run)


MVN documentation built on June 10, 2025, 5:12 p.m.

Related to hw in MVN...