Learn R Programming

fastmatrix (version 0.6-4)

mardia.test: Mardia test for multivariate normality

Description

Performs Mardia's tests to assess multivariate normality based on the multivariate skewness and kurtosis coefficients.

Usage

mardia.test(x)

Value

A list of class 'Mardia.test' with the following elements:

skewness

a list containig the statistic, the degrees of freedom (parameter), the p.value for the test and the estimated skewness coefficient.

kurtosis

a list containig the statistic, the p.value for the test and the estimated kurtosis coefficient.

Arguments

x

matrix of data with, say, \(p\) columns.

References

Mardia, K.V. (1970). Measures of multivariate skewness and kurtosis with applications. Biometrika 57, 519-530.

Mardia, K.V. (1974). Applications of some measures of multivariate skewness and kurtosis in testing normality and robustness studies. Sankhya 36, 115-128.

Examples

Run this code
setosa <- iris[1:50,1:4]
z <- mardia.test(setosa)
z

set.seed(149)
Sigma <- matrix(c(10,3,3,2), ncol = 2)
x <- rmnorm(n = 300, Sigma = Sigma)
z <- mardia.test(x)
z

Run the code above in your browser using DataLab