#
MaxSkew and MultiSkew: Two `R` Packages for Detecting, Measuring and Removing Multivariate Skewness

^{1}

^{2}

^{*}

^{†}

## Abstract

**:**

`R`packages

**MaxSkew**and

**MultiSkew**measure, test and remove skewness from multivariate data using their third-order standardized moments. Skewness is measured by scalar functions of the third standardized moment matrix. Skewness is tested with either the bootstrap or under normality. Skewness is removed by appropriate linear projections. The packages might be used to recover data features, as for example clusters and outliers. They are also helpful in improving the performances of statistical methods, as for example the Hotelling’s one-sample test. The Iris dataset illustrates the usages of

**MaxSkew**and

**MultiSkew**.

## 1. Introduction

`R`packages

**MaxSkew**and

**MultiSkew**provide an unified treatment of multivariate skewness by detecting, measuring and alleviating skewness from multivariate data. Data visualization and significance levels are used to assess the hypothesis of symmetry. Default measures of multivariate skewness depend on third-order moments of the standardized distribution. Linear projections might remove or at least alleviate multivariate skewness. To the best of our knowledge, no statistical packages compute their bootstrap estimates, the third cumulant and linear projections alleviating skewness.

**MaxSkew**and

**Multiskew**were released in 2017. Since then, there has been a lot of research on flexible multivariate distributions purported to model nonnormal features such as skewness. Their third cumulants do not necessarily have simple analytical expressions and might need to be investigated by means of simulations studies based on MaxSkew and MultiSkew. The remainder of the paper is organized as follows. Section 2 reviews the basic concepts of multivariate skewness within the frameworks of third moments and projection pursuit. It also describes some skewness-related features of the Iris dataset. Section 3 illustrates the package

**MaxSkew**. Section 4 describes the functions of

**MultiSkew**related to symmetrization, third moments and skewness measures. Section 5 contains some concluding remarks and hints for improving the packages.

## 2. Third Moment

`R`package

**datasets**:

`iris{datasets}`. We shall first download the data:

`R> data(iris)`. Then use the help command

`R>help(iris)`and the structure command

`R> str(iris)`to obtain the following information about this dataset. It contains the measurements in centimeters of four variables on 150 iris flowers: sepal length, sepal width, petal length and petal width. There is also a factor variable (Species) with three levels: setosa, versicolor and virginica. There are 50 rows for each species. The output of the previous code shows that the dataset is a data frame object containing 150 units and five variables:

- ‘data.frame’: 150 obs. of 5 variables:
- $ Sepal.Length: num 5.1 4.9 4.7 4.6 5 5.4 4.6 5 4.4 ...
- $ Sepal.Width : num 3.5 3 3.2 3.1 3.6 3.9 3.4 3.4 2.9 ...
- $ Petal.Length: num 1.4 1.4 1.3 1.5 1.4 1.7 1.4 1.5 1.4 ...
- $ Petal.Width : num 0.2 0.2 0.2 0.2 0.2 0.4 0.3 0.2 0.2 ...
- $ Species : Factor w/ 3 levels "setosa","versicolor",..: 1 1...

`R> pairs(iris[,1:4],col=c("red","green","blue")[as.numeric(Species)])`we obtain the multiple scatterplot of the Iris dataset (Figure 1).

**MaxSkew**and

**MultiSkew**to answer the following questions about the Iris dataset.

- Is skewness really inept at detecting nonnormality of the variables in the “setosa” group?
- Does skewness help in recovering the cluster structure?
- Can skewness be removed via meaningful linear projections?

## 3. MaxSkew

**MaxSkew**[44] is written in the

`R`programming language [45]. It is available for download on the Comprehensive

`R`Archive Network (CRAN) at https://CRAN.R-project.org/package=MaxSkew.

**MaxSkew**uses several

`R`functions. The first one is $\mathtt{eigen}\left\{\mathtt{base}\right\}$ [45]. It computes eigenvalues and eigenvectors of real or complex matrices. Its usage, as described by the command

`help(eigen)`is

`R> eigen(x, symmetric, only.values = FALSE, EISPACK = FALSE)`.

`values`(a vector containing the eigenvalues of x, sorted in decreasing order according to their modulus) and

`vectors`(either a matrix whose columns contain the normalized eigenvectors of x, or a null matrix if

`only.values`is set equal to TRUE). A second

`R`function used in

**MaxSkew**is $\mathtt{polyroot}\left\{\mathtt{base}\right\}$ [45] which finds the zeros of a real or complex polynomial. Its usage is

`polyroot(z)`, where z is the vector of polynomial coefficients arranged in increasing order. The

`Value`in output is a complex vector of length $n-1$, where n is the position of the largest non-zero element of z.

**MaxSkew**also uses the

`R`function $\mathtt{svd}\left\{\mathtt{base}\right\}$ [45] which computes the singular value decomposition of a matrix. Its usage is

`R> svd(x, nu = min(n, p), nv = min(n, p), LINPACK = FALSE)`.

`R`function used in

**MaxSkew**is $\mathtt{kronecker}\left\{\mathtt{base}\right\}$ [45] which computes the Kronecker product of two arrays, X and Y. The

`Value`in output is an array with dimensions

`dim(X) * dim(Y)`.

**MaxSkew**package finds orthogonal data projections with maximal skewness. The first data projection in the output is the most skewed among all data projections. The second data projection in the output is the most skewed among all data projections orthogonal to the first one, and so on. Ref. [4] motivates this method within the framework of model-based clustering. The package implements the algorithm described in [18] and is downloaded with the command

`R> install.packages(“MaxSkew”)`. The package is attached with the command

`R > library(MaxSkew)`.

**MaxSkew**and

**MultiSkew**require the dataset to be a data matrix object, so we transform the

`iris`data frame accordingly:

`R > iris.m<-data.matrix(iris)`. We check that we have a data matrix object with the command

- R > str(iris.m)
- num [1:150, 1:5] {5.1} {4.9} {4.7} {4.6 } {5} {5.4} {...}
- - attr(*, "dimnames")=List of 2
- ..$ : NULL
- ..$ : chr [1:5] "Sepal.Length" "Sepal.Width" "Petal.Length"
- "Petal.Width" ...

`help`command shows the basic informations about the package and the functions it contains:

`R > help(MaxSkew)`.

**MaxSkew**has three functions, two of which are internal. The usage of the main function is

`R> MaxSkew(data, iterations, components, plot)`,

`data`is a data matrix object,

`iterations`(the number of required iterations) is a positive integer,

`components`(the number of orthogonal projections maximizing skewness) is a positive integer smaller than the number of variables, and

`plot`is a dichotomous variable: TRUE/FALSE. If

`plot`is set equal to TRUE (FALSE) the scatterplot of the projections maximizing skewness appears (does not appear) in the output. The output includes a matrix of projected data, whose i-th row represents the i-th unit, while the j-th column represents the j-th projection. The output also includes the multiple scatterplot of the projections maximizing skewness. As an example, we call the function

`R > MaxSkew(iris.m[,1:4], 50, 2, TRUE)`.

`iris.m`data matrix object, because the last column is a label. As a result, we obtain a matrix with 150 rows and 2 columns containing the projected data and a multiple scatterplot. The structure of the resulting matrix is

- R> str(MaxSkew(iris.m[,1:4], 50, 2, TRUE))
- num [1:150, 1:2] −2.63 −2.62 −2.38 −2.58 −2.57 ...

- R > iris.projections<−MaxSkew(iris.m[,1:4], 50,2,TRUE)
- R > iris.projections[1:3,]
- [,1] [,2]
- [1,] −2.631244186 −0.817635353
- [2,] −2.620071890 −1.033692782
- [3,] −2.376652037 −1.311616693

**MaxSkew**, have been investigated by several authors ([4,9,10,11,12,18]). For the Iris dataset, it is well illustrated by the scatterplot of the two most skewed, mutually orthogonal projections, with different colors to denote the group memberships (Figure 3b). The plot is obtained with the commands

- R> attach(iris)
- R> iris.projections<−MaxSkew(iris.m[,1:4], 50,2,TRUE)
- R> iris.projections.species<−cbind(iris.projections,
- iris$Species)
- R> pairs(iris.projections.species[,1:2],
- col=c("red","green","blue")[as.numeric(Species)])
- R>detach(iris)

## 4. MultiSkew

**MultiSkew**([48]) is written in the

`R`programming language [45] and depends on the recommended package

**MaxSkew**([44]). It is available for download on the Comprehensive

`R`Archive Network (CRAN) at https://CRAN.R-project.org/package=MultiSkew. The

**MultiSkew**package computes the third multivariate cumulant of either the raw, centered or standardized data. It also computes the main measures of multivariate skewness, together with their bootstrap distributions. Finally, it computes the least skewed linear projections of the data. The

**MultiSkew**package contains six different functions. First install it with the command

`R> install.packages(“MultiSkew”)`and then use the command

`R > library(MultiSkew)`to attach the package. Since the package

**MultiSkew**depends on the package

**MaxSkew**, the latter is loaded together with the former.

#### 4.1. MinSkew

`R > MinSkew(data, dimension)`alleviates sample skewness by projecting the data onto appropriate linear subspaces and implements the method in [34]. It requires two input arguments:

`data`(a data matrix object), and

`dimension`(the number of required projections), which must be an integer between 2 and the number of the variables in the data matrix. The output has two values:

`Linear`(the linear function of the variables) and

`Projections`(the projected data).

`Linear`is a matrix with the number of rows and columns equal to the number of variables and number of projections.

`Projections`is a matrix whose number of rows and columns equal the number of observations and the number of projections. We call the function using our data matrix object:

`R > MinSkew(iris.m[,1:4],2)`. We obtain the matrix

`Linear`as a first output. With the commands

- R> attach(iris)
- R> projections.species<−cbind(Projections,iris$Species)
- R> pairs(projections.species[,1:2],col=c("red","green",
- "blue")[as.numeric(Species)])
- R> detach(iris)

`MinSkew`projections remind of univariate normality, as it can be seen from Figure 6a,b, obtained with the code

- R> hist(Projections[,1],freq=FALSE)
- R> curve(dnorm, col = 2, add = TRUE)
- R> hist(Projections[,2],freq=FALSE)
- R> curve(dnorm, col = 2, add = TRUE)

#### 4.2. Third

`Third`, and its usage is

`R > Third(data,type)`.

`data`is a data matrix object while

`type`may be: “raw” (the third raw moment), “central” (the third central moment) and “standardized” (the third standardized moment). The output of the function, called

`ThirdMoment`, is a matrix containing all moments of order three which can be obtained from the variables in

`data`. We compute the third raw moments of the numerical variables in the iris dataset with the command

`R > Third(iris.m[,1:4], “raw”)`. The matrix

`ThirdMoment`is:

- [1] "Third Moment"
- [,1] [,2] [,3] [,4]
- [1,] 211.6333 106.0231 145.8113 47.7868
- [2,] 106.0231 55.4270 69.1059 22.3144
- [3,] 145.8113 69.1059 109.9328 37.1797
- [4,] 47.7868 22.3144 37.1797 12.9610
- [5,] 106.0231 55.4270 69.1059 22.3144
- [6,] 55.4270 30.3345 33.7011 10.6390
- [7,] 69.1059 33.7011 50.7745 17.1259
- [8,] 22.3144 10.6390 17.1259 5.9822
- [9,] 145.8113 69.1059 109.9328 37.1797
- [10,] 69.1059 33.7011 50.7745 17.1259
- [11,] 109.9328 50.7745 86.4892 29.6938
- [12,] 37.1797 17.1259 29.6938 10.4469
- [13,] 47.7868 22.3144 37.1797 12.9610
- [14,] 22.3144 10.6390 17.1259 5.9822
- [15,] 37.1797 17.1259 29.6938 10.4469
- [16,] 12.9610 5.9822 10.4469 3.7570

- R> str(ThirdMoment)
- num [1:16, 1:4] 211.6 106 145.8 47.8 106 ...

`R > Third(iris.m[,1:4], "central")`. The output which appears in console is

- [1] "Third Moment"
- [,1] [,2] [,3] [,4]
- [1,] 0.1752 0.0420 0.1432 0.0259
- [2,] 0.0420 −0.0373 0.1710 0.0770
- [3,] 0.1432 0.1710 −0.1920 −0.1223
- [4,] 0.0259 0.0770 −0.1223 −0.0466
- [5,] 0.0420 −0.0373 0.1710 0.0770
- [6,] −0.0373 0.0259 −0.1329 −0.0591
- [7,] 0.1710 −0.1329 0.5943 0.2583
- [8,] 0.0770 −0.0591 0.2583 0.1099
- [9,] 0.1432 0.1710 −0.1920 −0.1223
- [10,] 0.1710 −0.1329 0.5943 0.2583
- [11,] −0.1920 0.5943 −1.4821 −0.6292
- [12,] −0.1223 0.2583 −0.6292 −0.2145
- [13,] 0.0259 0.0770 −0.1223 −0.0466
- [14,] 0.0770 −0.0591 0.2583 0.1099
- [15,] −0.1223 0.2583 −0.6292 −0.2145
- [16,] −0.0466 0.1099 −0.2145 −0.0447

`ThirdMoment`is

- R> str(ThirdMoment)
- num [1:16, 1:4] 0.1752 0.042 0.1432 0.0259 0.042 ...

`type`equal to

`standardized`:

`R > Third(iris.m[,1:4], "standardized")`. The output is

- [1] "Third Moment"
- [,1] [,2] [,3] [,4]
- [1,] 0.2988 −0.0484 0.3257 0.0034
- [2,] −0.0484 0.0927} −0.0358 −0.0444
- [3,] 0.3257 −0.0358} 0.0788 −0.2221
- [4,] 0.0034 −0.0444} −0.2221 0.0598
- [5,] −0.0484 0.0927} −0.0358 −0.0444
- [6,] 0.0927 −0.0331} −0.1166 −0.0844
- [7,] −0.0358 −0.1166} 0.2894 0.1572
- [8,] −0.0444 −0.0844} 0.1572 0.2276
- [9,] 0.3257 −0.0358} 0.0788 −0.2221
- [10,] −0.0358 −0.1166} 0.2894 0.1572
- [11,] 0.0788 0.2894} −0.0995 −0.3317
- [12,] −0.2221 0.1572} −0.3317 0.3009
- [13,] 0.0034 −0.0444} −0.2221 0.0598
- [14,] −0.0444 −0.0844} 0.1572 0.2276
- [15,] −0.2221 0.1572} −0.3317 0.3009
- [16,] 0.0598 0.2276} 0.3009 0.8259

- R> str(ThirdMoment)
- num [1:16, 1:4] 0.2988 −0.0484 0.3257 0.0034 −0.0484 ...

`R> Third(MaxSkew(iris.m[1:50,1:4],50,2,TRUE),"standardized")`

- [1] "Third Moment"
- [,1] [,2]
- [1,] 1.2345 0.0918
- [2,] 0.0918 −0.0746
- [3,] 0.0918 −0.0746
- [4,] −0.0746 0.5936

`R> MinSkew(iris.m[,1:4],2)`and

`R> Third(Projections,“standardized”)`,

`Projections`is a value in output of the function

`MinSkew`, to compute the third standardized cumulant of the two least skewed projections obtained from the four numerical variables of the Iris dataset. The resulting matrix is

- [,1] [,2]
- [1,] −0.0219 0.0334
- [2,] 0.0334 −0.0151
- [3,] 0.0334 −0.0151
- [4,] −0.0151 −0.0963

#### 4.3. Skewness Measures

**MultiSkew**has other four functions. All of them compute skewness measures. The first one is

`R > FisherSkew(data)`and computes Fisher’s measure of skewness, that is the third standardized moment of each variable in the dataset. The usage of the function shows that there is only one input argument:

`data`(a data matrix object). The output of the function is a dataframe, whose name is

`tab`, containing Fisher’s measure of skewness of each variable of the dataset. To illustrate the function, we use the four numerical variables in the Iris dataset with the command

`R > FisherSkew(iris.m[,1:4])`and obtain the output

- R > tab
- X1 X2 X3 X4
- Variables 1.0000 2.0000 3.0000 4.000
- Fisher Skewness 0.3118 0.3158 −0.2721 −0.1019

`X1`is the variable Sepal.Length,

`X2`is the variable Sepal.Width,

`X3`is the variable Petal.Length, and

`X4`is the variable Petal.Width. Another function is

`PartialSkew: R > PartialSkew(data)`. It computes the multivariate skewness measure as defined in [27]. The input is still a data matrix, while the values in output are the objects

`Vector, Scalar`and

`pvalue`. The first is the skewness measure and it has a number of elements equal to the number of the variables in the dataset used as input. The second is the squared norm of

`Vector`. The last is the probability of observing a value of

`Scalar`greater than the observed one, when the data are normally distributed and the sample size is large enough. We apply this function to our dataset:

`R > PartialSkew(iris.m[,1:4])`and obtain

- R > Vector
- [,1]
- [1,] 0.5301
- [2,] 0.4355
- [3,] 0.4105
- [4,] 0.4131
- R > Scalar
- [,1]
- [1,] 0.8098
- R > pvalue
- [,1]
- [1,] 0.0384

`R > SkewMardia(data)`computes the multivariate skewness introduced in [24], that is the sum of squared elements in the third standardized cumulant of the data matrix. The output of the function is the squared norm of the third cumulant of the standardized data (

`MardiaSkewness`) and the probability of observing a value of

`MardiaSkewness`greater than the observed one, when data are normally distributed and the sample size is large enough (

`pvalue)`. With the command

`R > SkewMardia(iris.m[,1:4])`we obtain

- R > MardiaSkewness
- [1] 2.69722
- R > pvalue
- [1] 4.757998e−07

`SkewBoot`performs bootstrap inference for multivariate skewness measures. It computes the bootstrap distribution, its histogram and the p-value of the chosen measure of multivariate skewness using a given number of bootstrap replicates. The function calls the function

`MaxSkew`contained in

**MaxSkew**package, with the number of iterations required by the function

`MaxSkew`set equal to 5. The function’s usage is

`R > SkewBoot(data, replicates, units, type)`. It requires four inputs:

`data`(the data matrix object),

`replicates`(the number of bootstrap replicates),

`units`(the number of rows in the data matrices sampled from the original data matrix object) and

`type`. The latter may be “Directional”, “Partial” or “Mardia” (three different measures of multivariate skewness). If

`type`is set equal to “Directional” or “Mardia”,

`units`is an integer greater than the number of variables. If

`type`is set equal to “Partial”,

`units`is an integer greater than the number of variables augmented by one. The values in output are three:

`histogram`(a plot of the above mentioned bootstrap distribution),

`Pvalue`(the p-value of the chosen skewness measure) and

`Vector`(the vector containing the bootstrap replicates of the chosen skewness measure). For the reproducibility of the result, before calling the function

`SkewBoot`, we type

`R> set.seed(101)`and then

`R > SkewBoot(iris.m[,1:4],10,11,“Directional”)`. We obtain the output

- [1] "Vector"
- [1] 2.0898 1.4443 1.0730 0.7690 0.6914 0.3617 0.2375 0.0241
- [9] −0.1033 0.6092
- [1] "Pvalue"
- [1] 0.7272727

`SkewBoot`, first setting

`type`equal to

`Mardia`and then equal to

`Partial`:

- R> set.seed(101)
- R > SkewBoot(iris.m[,1:4],10,11,"Mardia").

- [1] "Vector"
- [1] 1.4768 1.1260 0.8008 0.6164 0.4554 0.1550 0.0856
- −0.1394 −0.1857 0.4018
- [1] "Pvalue"
- [1] 0.6363636
- R> set.seed(101)
- R > SkewBoot(iris.m[,1:4],10,11,"Partial"),
- [1] "Vector"
- [1] 1.5435 1.0110 0.6338 0.2858 −0.0053 −0.3235 −0.6701
- -1.1134 −1.7075 −0.9563
- [1] "Pvalue"
- [1] 0.3636364

`R > FisherSkew(iris.m[1:50,1:4])`. The output is the dataframe

- R> tab
- X1 X2 X3 X4
- Variables 1.0000 2.0000 3.0000 4.0000
- Fisher Skewness 0.1165 0.0399 0.1032 1.2159

`R>iris.m.mardia<-cbind(iris.m[1:50,1],iris.m[1:50,4])`

`R>SkewMardia(iris.m.mardia)`.

- R> MardiaSkewness
- [1] 1.641217
- R> pvalue
- [1] 0.008401288

## 5. Conclusions

**MaxSkew**and

**MultiSkew**are two

`R`packages aimed at detecting, measuring and removing multivariate skewness. They also compute the three main skewness measures. The function

`SkewBoot`computes the bootstrap p-value corresponding to the chosen skewness measure. Skewness removal might be achieved with the function

`MinSkew`. The function

`Third`, which computes the third moment, plays a role whenever the researcher compares the third sample moment with the expected third moment under a given model, in order to get a better insight into the model’s fit.

**MaxSkew**and

**Multiskew**is that they address skewness by means of third-order moments only. In the first place, they may not exist even if the distribution is skewed, as it happens for the skew-Cauchy distribution. In the second place, the third moment of a random vector may be a null matrix also when the distribution of random vector itself is asymmetric. In the third place, third-order moments are not robust to outliers. We are currently investigating these problems.

## Author Contributions

## Funding

## Conflicts of Interest

## References

- Bonhomme, J.; Robin, J. Consistent noisy independent component analysis. J. Econom.
**2009**, 149, 12–25. [Google Scholar] [CrossRef] [Green Version] - Mooijaart, A. Factor analysis for non-normal variables. Psychometrika
**1985**, 50, 323–342. [Google Scholar] [CrossRef] - Christiansen, M.; Loperfido, N. Improved Approximation of the Sum of Random Vectors by the Skew-Normal Distribution. J. Appl. Probab.
**2014**, 51, 466–482. [Google Scholar] [CrossRef] - Loperfido, N. Finite Mixtures, Projection Pursuit and Tensor Rank: A Triangulation. Adv. Data Anal. Classif.
**2019**, 31, 145–173. [Google Scholar] [CrossRef] - Van Hulle, M.M. Edgeworth Approximation of Multivariate Differential Entropy. Neural Comput.
**2005**, 17, 1903–1910. [Google Scholar] [CrossRef] [PubMed] - Paajarvi, P.; Leblanc, J. Skewness Maximization for Impulsive Sources in Blind Deconvolution. In Proceedings of the 6th Nordic Signal Processing Symposium—NORSIG, Espoo, Finland, 9–11 June 2004. [Google Scholar]
- De Luca, G.; Loperfido, N. Modelling Multivariate Skewness in Financial Returns: A SGARCH Approach. Eur. J. Financ.
**2015**, 21, 1113–1131. [Google Scholar] [CrossRef] - Elyasiani, E.; Mansur, I. Hedge fund return, volatility asymmetry, and systemic effects: A higher-moment factor-EGARCH model. J. Financ. Stab.
**2017**, 28, 49–65. [Google Scholar] [CrossRef] - Kaban, A.; Girolami, M. Clustering of text documents by skewness maximization. In Proceedings of the International Workshop on Independent Component Analysis and Blind Signal Separation (ICA2000), Helsinki Finland, 19–22 June 2000; Pajunen, P., Karhunen, J., Eds.; Springer: Helsinki, Finland, 2000; pp. 435–440. [Google Scholar]
- Loperfido, N. Skewness and the Linear Discriminant Function. Stat. Probab. Lett.
**2013**, 83, 93–99. [Google Scholar] [CrossRef] - Loperfido, N. Vector-Valued Skewness for Model-Based Clustering. Stat. Probab. Lett.
**2015**, 99, 230–237. [Google Scholar] [CrossRef] - Tarpey, T.; Loperfido, N. Self-Consistency and a Generalized Principal Subspace Theorem. J. Multivar. Anal.
**2015**, 133, 27–37. [Google Scholar] [CrossRef] - Kollo, T.; von Rosen, D. Advanced Multivariate Statistics with Matrices; Springer: Dordrecht, The Netherlands, 2005. [Google Scholar]
- Jondeau, E.; Rockinger, M. Optimal Portfolio Allocation under Higher Moments. Eur. Financ. Manag.
**2006**, 12, 29–55. [Google Scholar] [CrossRef] [Green Version] - Mardia, K. The effect of nonnormality on some multivariate tests and robustness to nonnormality in the linear model. Biometrika
**1971**, 58, 105–121. [Google Scholar] [CrossRef] - Yin, X.; Cook, R. Estimating central subspaces via inverse third moments. Biometrika
**2003**, 90, 113–125. [Google Scholar] [CrossRef] - McCullagh, P.; Cox, D. Invariants and Likelihood Ratio Statistics. Ann. Stat.
**1986**, 14, 1419–1430. [Google Scholar] [CrossRef] - Loperfido, N. Skewness-Based Projection Pursuit: A Computational Approach. Comput. Stat. Data Anal.
**2018**, 120, 42–57. [Google Scholar] [CrossRef] - Fiorentini, G.; Planas, C.; Rossi, A. Skewness and kurtosis of multivariate Markov-switching processes. Comput. Stat. Data Anal.
**2016**, 100, 153–159. [Google Scholar] [CrossRef] [Green Version] - Genton, M.G.; He, L.; Liu, X. Moments of skew-normal random vectors and their quadratic forms. Stat. Probab. Lett.
**2001**, 51, 319–325. [Google Scholar] [CrossRef] - Kim, H.M.; Mallick, B. Moments of random vectors with skew t distribution and their quadratic form. Stat. Probab. Lett.
**2003**, 63, 417–423. [Google Scholar] [CrossRef] - Lark, R. Using third-order cumulants to investigate spatial variation: A case study on the porosity of the Bunter Sandstone. Spat. Stat.
**2015**, 11, 196–212. [Google Scholar] [CrossRef] - Loperfido, N. Generalized Skew-Normal Distributions. In Skew-Elliptical Distributions and Their Applications: A Journey Beyond Normality; CRC/Chapman & Hall: Boca Raton, FL, USA, 2004; pp. 65–80. [Google Scholar]
- Mardia, K. Measures of multivariate skewness and kurtosis with applications. Biometrika
**1970**, 57, 519–530. [Google Scholar] [CrossRef] - Davis, A. On the Effects of Moderate Multivariate Nonnormality on Wilks’s Likelihood Ratio Criterion. Biometrika
**1980**, 67, 419–427. [Google Scholar] [CrossRef] - Isogai, T. On measures of multivariate skewness and kurtosis. Math. Jpn.
**1983**, 28, 251–261. [Google Scholar] - Mòri, T.; Rohatgi, V.; Székely, G. On multivariate skewness and kurtosis. Theory Probab. Its Appl.
**1993**, 38, 547–551. [Google Scholar] [CrossRef] - Malkovich, J.; Afifi, A. On Tests for Multivariate Normality. J. Am. Stat. Assoc.
**1973**, 68, 176–179. [Google Scholar] [CrossRef] - Loperfido, N. Singular Value Decomposition of the Third Multivariate Moment. Linear Algebra Its Appl.
**2015**, 473, 202–216. [Google Scholar] [CrossRef] - Everitt, B. A Monte Carlo investigation of the robustness of Hotelling One- and Two-sample T
^{2}Test. J. Am. Stat. Assoc.**1979**, 74, 48–51. [Google Scholar] - Davis, A. On the distribution of Hotelling’s one-sample T
^{2}under moderate non-normality. J. Appl. Probab.**1982**, 19, 207–216. [Google Scholar] [CrossRef] - Hubert, M.; Van der Veeken, S. Outlier detection for skewed data. J. Chemom.
**2008**, 22, 235–246. [Google Scholar] [CrossRef] - Lin, T.; Lin, T. Supervised learning of multivariate skew normal mixture models with missing information. Comput. Stat.
**2010**, 25, 183–201. [Google Scholar] [CrossRef] - Loperfido, N. Linear Transformations to Symmetry. J. Multivar. Anal.
**2014**, 129, 186–192. [Google Scholar] [CrossRef] - Magnus, J.; Neudecker, H. Matrix Differential Calculus, 3rd ed.; Wiley: New York, NY, USA, 2019. [Google Scholar]
- Loperfido, N. Canonical Transformations of Skew-Normal Variates. TEST
**2010**, 19, 146–165. [Google Scholar] [CrossRef] - Huber, P. Projection pursuit (with discussion). Ann. Stat.
**1985**, 13, 435–475. [Google Scholar] [CrossRef] - Sun, J. Projection Pursuit. In Encyclopedia of Statistical Sciences; Wiley: New York, NY, USA, 2006; Volume 10. [Google Scholar]
- Henze, N. Limit laws for multivariate skewness in the sense of Mòri, Rohatgi and Székely. Stat. Probab. Lett.
**1997**, 33, 299–307. [Google Scholar] [CrossRef] - Henze, N. Extreme smoothing and testing for multivariate normality. Stat. Probab. Lett.
**1997**, 35, 203–213. [Google Scholar] [CrossRef] - Henze, N.; Klar, B.; Meintanis, S. Invariant tests for symmetry about an unspecified point based on the empirical characteristic function. J. Multivar. Anal.
**2003**, 87, 275–297. [Google Scholar] [CrossRef] [Green Version] - Fruhwirth-Schnatter. Finite Mixtures and Markov Switching Models; Springer: New York, NY, USA; Berlin/Heidelberg, Germany, 2006. [Google Scholar]
- Korkmaz, S.; Goksuluk, D.; Zararsiz, G. MVN: An R Package for Assessing Multivariate Normality. R J.
**2014**, 6, 151–162. [Google Scholar] [CrossRef] [Green Version] - Franceschini, C.; Loperfido, N.
**MaxSkew**: Skewness-Based Projection Pursuit,`R`Package Version 1.1; 2017. Available online: https://CRAN.R-project.org/package=MaxSkew (accessed on 8 May 2017). `R`Development Core Team.`R`: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2017. [Google Scholar]- Friedman, J.; Tukey, J. A projection pursuit algorithm for exploratory data analysis. IEEE Trans. Comput.
**1974**, C-23, 881–889. [Google Scholar] [CrossRef] - Hui, G.; Lindsay, B. Projection pursuit via white noise matrices. Sankhya B
**2010**, 72, 123–153. [Google Scholar] [CrossRef] - Franceschini, C.; Loperfido, N.
**MultiSkew**: Measures, Tests and Removes Multivariate Skewness,`R`Package Version 1.1.1; 2017. Available online: https://CRAN.R-project.org/package=MultiSkew (accessed on 24 June 2017).

**Figure 2.**(

**a**) Histogram of petal length in the Iris dataset, (

**b**) Histogram of petal length in the “setosa” group.

**Figure 3.**(

**a**) Multiple scatterplot of the first two most skewed, mutually orthogonal projections, (

**b**) Scatterplot of the first two most skewed, mutually orthogonal projections of Iris data, with different colors to denote different group memberships.

**Figure 4.**Scatterplot of the two most skewed, mutually orthogonal projections computed from data in the “setosa” group.

**Figure 6.**(

**a**) Histogram of the first projection of the Iris dataset obtained with

`MinSkew`, (

**b**) Histogram of the second projection of the Iris dataset obtained with

`MinSkew`.

**Figure 8.**(

**a**) Bootstrapped Mardia’s skewness of Iris dataset, (

**b**) Bootstrapped Partial skewness of Iris dataset.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Franceschini, C.; Loperfido, N.
MaxSkew and MultiSkew: Two `R` Packages for Detecting, Measuring and Removing Multivariate Skewness. *Symmetry* **2019**, *11*, 970.
https://doi.org/10.3390/sym11080970

**AMA Style**

Franceschini C, Loperfido N.
MaxSkew and MultiSkew: Two `R` Packages for Detecting, Measuring and Removing Multivariate Skewness. *Symmetry*. 2019; 11(8):970.
https://doi.org/10.3390/sym11080970

**Chicago/Turabian Style**

Franceschini, Cinzia, and Nicola Loperfido.
2019. "MaxSkew and MultiSkew: Two `R` Packages for Detecting, Measuring and Removing Multivariate Skewness" *Symmetry* 11, no. 8: 970.
https://doi.org/10.3390/sym11080970