Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sample_Mardia_measures

The Mardia measures of multivariate skewness and kurtosis for a given sample


Description

Given a multivariate sample, the Mardia measures of skewness and kurtosis are computed, along with their p-values for testing normality

Usage

sample_Mardia_measures(data, correct = FALSE)

Arguments

data

a data matrix

correct

(logical) if correct=TRUE, the ‘corrected’ sample variance matrix is used, otherwise the ‘uncorrected’ version is used (default)

Details

For a given a data matrix, the multivariate measures of skewness and kurtosis introduced by Mardia (1970, 1974) are computed, along with some associated quantities. We follow the notation of the 1974 paper.

If n denotes the number of complete cases, the condition n>3 is required for numerical computation. Clearly, a much larger n is required for meaningful statistical work.

The sample variance matrix S appearing in (2.2) and (2.4) is computed here (in the dafault setting) with the n denominator, at variance from the commonly employed n-1 denominator. With this definition of S, one can reproduce the numerical outcomes of the example on p.127 of Mardia (1974).

The approximate observed significance levels for testing normality, p.b1 and p.b2, are computed using expressions (5.5) and (5.6) in Section 5 of Mardia (1974). For p.b2, the condition (n-d-1)>0 is required, where d denotes the number of variables.

Value

A named vector with the following components:

b1

the measure of asymmetry as given in (2.2)

b2

the measure of kurtosis as given in (2.4)

g1

the measure of asymmetry as given in (2.10)

g2

the measure of kurtosis as given in (2.11)

p.b1

observed significance level of b1

p.b2

observed significance level of b2

n

The number of complete cases in the input data matrix

where the quoted formulae are those of Mardia (1974).

Author(s)

Adelchi Azzalini

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 ser.B, 36, 115-128.

Examples

x <- rmnorm(100, mean=1:3, varcov=toeplitz(1/(1:3)))
sample_Mardia_measures(x)

mnormt

The Multivariate Normal and t Distributions, and Their Truncated Versions

v2.0.2
GPL-2 | GPL-3
Authors
Adelchi Azzalini [aut, cre], Alan Genz [aut] (most Fortran code), Alan Miller [ctb] (Fortran routine PHI), Michael J. Wichura [ctb] (Fortran routine PHINV), G. W. Hill [ctb] (Fortran routine STDINV), Yihong Ge [ctb] (Fortran routines BNVU and MVBVU).
Initial release
2020-08-31

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.