Mardia's estimate of multivariate skewness is given by $$ b_{1, k} = \frac{1}{n^2} \sum_{i = 1}^{n} \sum_{j = 1}^{n} \left[ \left( \mathbf{X}_{i} - \mathbf{\bar{X}} \right)^{T} \boldsymbol{\hat{\Sigma}}^{-1} \left( \mathbf{X}_{j} - \mathbf{\bar{X}} \right) \right]^{3} $$ where
\(\mathbf{X}\) is the \(n \times k\) sample data
\(\mathbf{\bar{X}}\) represent sample means
\(\mathbf{X}_{i} - \mathbf{\bar{X}}\) and \(\mathbf{X}_{j} - \mathbf{\bar{X}}\) represent deviations from the mean
\(\boldsymbol{\hat{\Sigma}}\) is the estimated variance-covariance matrix of \(\mathbf{X}\) using sample data
mardiaskew(X)
X | Matrix or data frame. |
---|
Returns a vector with the following elements
Estimate of multivariate skewness \(\left( b_{1, k} \right)\) .
chi-square statistic \(\left( \frac{nb_{1, k}}{6} \right)\) .
Degrees of freedom \(\left( \frac{k(k + 1)(k + 2)}{6} \right)\) .
p-value associated with the chi-square statistic.
If the null hypothesis that \(\mathbf{X}\) comes from a multivariate normal distribution is true, \(\frac{nb_{1, k}}{6}\) follows a chi-square \(\left( \chi^2 \right)\) distribution with a df of \(\frac{k(k + 1)(k + 2)}{6}\) .
Mardia, K. V. (1970). Measures of multivariate skewness and kurtosis with applications. Biometrika, 57(3), 519-530. doi:10.2307/2334770.
Mardia, K. V. (1974). Applications of Some Measures of Multivariate Skewness and Kurtosis in Testing Normality and Robustness Studies. Sankhyā: The Indian Journal of Statistics, Series B (1960-2002), 36(2), 115-128.
set.seed(42) n <- 100 mu <- c(0, 0, 0) Sigma <- matrix( data = c(1, 0.5, 0.5, 0.5, 1, 0.5, 0.5, 0.5, 1), ncol = 3 ) X <- MASS::mvrnorm(n = n, mu = mu, Sigma = Sigma) mardiaskew(X)#> b1 b1.chisq b1.correction b1.chisq.corrected #> 1.510158866 25.169314434 1.030152993 25.928244596 #> b1.df b1.p b1.p.corrected #> 10.000000000 0.005033647 0.003837901