energy: E-Statistic Test for Multivariate Normality (Energy Test)

View source: R/energy.R

energyR Documentation

E-Statistic Test for Multivariate Normality (Energy Test)

Description

Performs the E-statistic test for multivariate normality using a parametric bootstrap to estimate the null distribution of the test statistic.

Usage

energy(data, B = 1000, seed = 123)

Arguments

data

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

B

Integer; number of bootstrap replicates to estimate the null distribution. Default is 1000.

seed

Optional integer to set the random seed for reproducibility.

Value

A data frame with one row containing the following columns: Test, the name of the test ("E-Statistic"); Statistic, the observed E-statistic; and p.value, the p-value obtained from the bootstrap procedure.

Examples

## Not run: 
data <- iris[1:50, 1:4]
energy_result <- energy(data, B = 500)
energy_result

## End(Not run)


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

Related to energy in MVN...