| sample_Mardia_measures | R Documentation |
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)
data |
a data matrix |
correct |
(logical) if |
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.
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 |
p.b2 |
observed significance level of |
n |
The number of complete cases in the input data matrix |
where the quoted formulae are those of Mardia (1974).
Adelchi Azzalini
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.