sample_Mardia_measures: The Mardia measures of multivariate skewness and kurtosis for...

View source: R/misc_funct.R

sample_Mardia_measuresR Documentation

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 obtains the same numerical outcome 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

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

mnormt documentation built on Sept. 26, 2022, 5:05 p.m.