mardia: Mardia's Test for Multivariate Normality

View source: R/mardia.R

mardiaR Documentation

Mardia's Test for Multivariate Normality

Description

Performs Mardia’s skewness and kurtosis tests to assess multivariate normality in a multivariate dataset.

Usage

mardia(
  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-values via a bootstrap distribution of the test statistics. Default is FALSE.

B

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

cores

Integer; number of cores to use when bootstrap = TRUE. Parallelisation is done via parallel::mclapply. Default is 1.

Value

A data frame with two rows, one for Mardia's skewness test and one for the kurtosis test. Each row contains the name of the test (Test), the test statistic (Statistic), and the associated p-value (p.value).

Examples

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

## End(Not run)


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

Related to mardia in MVN...