Given a multivariate sample, the Mardia measures of skewness and kurtosis are computed, along with their p-values for testing normality
sample_Mardia_measures(data, correct = FALSE)
A named vector with the following components:
the measure of asymmetry as given in (2.2)
the measure of kurtosis as given in (2.4)
the measure of asymmetry as given in (2.10)
the measure of kurtosis as given in (2.11)
observed significance level of b1
observed significance level of b2
The number of complete cases in the input data matrix
where the quoted formulae are those of Mardia (1974).
a data matrix
(logical) if correct=TRUE
, the ‘corrected’
sample variance matrix is used, otherwise the ‘uncorrected’ version
is used (default)
Adelchi Azzalini
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.
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.
set.seed(1)
x <- rmnorm(100, mean=1:3, varcov=toeplitz(1/(1:3)))
sample_Mardia_measures(x)
Run the code above in your browser using DataLab