This function computes the invariant measure of multivariate sample skewness due to Malkovich and Afifi (1973).
MASkew(data, Points = NULL)value of sample skewness in the sense of Malkovich and Afifi.
a n x d matrix of d dimensional data vectors.
points for approximation of the maximum on the sphere. Points=NULL generates 1000 uniformly distributed Points on the d dimensional unit sphere.
Multivariate sample skewness due to Malkovich and Afifi (1973) is defined by $$b_{n,d,M}^{(1)}=\max_{u\in \{x\in\mathbf{R}^d:\|x\|=1\}}\frac{\left(\frac{1}{n}\sum_{j=1}^n(u^\top X_j-u^\top \overline{X}_n )^3\right)^2}{(u^\top S_n u)^3},$$ where \(\overline{X}_n\) is the sample mean and \(S_n\) is the sample covariance matrix of the random vectors \(X_1,\ldots,X_n\). To ensure that the computation works properly \(n \ge d+1\) is needed. If that is not the case the function returns an error.
Malkovich, J.F., and Afifi, A.A. (1973), On tests for multivariate normality, J. Amer. Statist. Ass., 68:176–179.
Henze, N. (2002), Invariant tests for multivariate normality: a critical review, Statistical Papers, 43:467–506.
MASkew(MASS::mvrnorm(50,c(0,1),diag(1,2)))
Run the code above in your browser using DataLab