Learn R Programming

MVN (version 6.1)

energy: 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)

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.

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.

Examples

Run this code
if (FALSE) {
data <- iris[1:50, 1:4]
energy_result <- energy(data, B = 500)
energy_result
}

Run the code above in your browser using DataLab