Title: | Measures, Tests and Removes Multivariate Skewness |
---|---|
Description: | Computes the third multivariate cumulant of either the raw, centered or standardized data. Computes the main measures of multivariate skewness, together with their bootstrap distributions. Finally, computes the least skewed linear projections of the data. |
Authors: | Cinzia Franceschini, Nicola Loperfido |
Maintainer: | Cinzia Franceschini <[email protected]> |
License: | GPL-2 |
Version: | 1.1.1 |
Built: | 2024-11-17 06:28:37 UTC |
Source: | CRAN |
Computes the third multivariate cumulant of either the raw, centered or standardized data. Computes the main measures of multivariate skewness, together with their bootstrap distributions. Finally, computes the least skewed linear projections of the data
Package: MultiSkew
Type: Package
Title: Measures, Tests and Removes Multivariate Skewness
Version: 1.1.1
Date: 2017-06-13
Author: Cinzia Franceschini, Nicola Loperfido
Maintainer: Cinzia Franceschini <[email protected]>
License: GPL-2
Bartoletti, S. and Loperfido, N. (2010). Modelling Air Pollution Data by the Skew-Normal Distribution. Stochastic Environmental Research & Risk Assessment 24, 513-517.
Loperfido, N. (2013). Skewness and the Linear Discriminant Function. Statistics & Probability Letters 83, 93-99.
Loperfido, N. (2014). Linear Transformations to Symmetry. Journal of Multivariate Analysis 129, 186-192.
Malkovich, J.F. and Afifi, A.A. (1973). On Tests for Multivariate Normality. J. Amer. Statist. Ass. 68, 176-179.
Mardia, K.V. (1970). Measures of multivariate skewness and kurtosis with applications. Biometrika 57, 519-530.
Mori T.F., Rohatgi V.K. and Szekely G.J. (1993). On multivariate skewness and kurtosis. Theory Probab. Appl. 38, 547-551.
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) MinSkew(PM10_2006_matrix[,2:5],4) PartialSkew(PM10_2006_matrix[,2:5]) SkewMardia(PM10_2006_matrix[,2:5]) Third(PM10_2006_matrix[,2:5], "raw") #library(MaxSkew) SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Directional") SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Mardia") SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Partial")
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) MinSkew(PM10_2006_matrix[,2:5],4) PartialSkew(PM10_2006_matrix[,2:5]) SkewMardia(PM10_2006_matrix[,2:5]) Third(PM10_2006_matrix[,2:5], "raw") #library(MaxSkew) SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Directional") SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Mardia") SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Partial")
Computes Fisher's measure of skewness, that is the third standardized moment of each variable in the dataset
FisherSkew(data)
FisherSkew(data)
data |
data matrix |
Dataframe containing Fisher's measure of skewness of each variable of the dataset
Cinzia Franceschini and Nicola Loperfido
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) FisherSkew(PM10_2006_matrix)
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) FisherSkew(PM10_2006_matrix)
Reduces sample skewness by projecting the data onto appropriate linear subspaces
MinSkew(data, dimension)
MinSkew(data, dimension)
data |
data matrix |
dimension |
number of required projections |
Linear |
linear function of the variables |
Projections |
projected data |
Cinzia Franceschini and Nicola Loperfido
Loperfido, N. (2014). Linear Transformations to Symmetry. Journal of Multivariate Analysis 129, 186-19
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) MinSkew(PM10_2006_matrix[,2:5],4)
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) MinSkew(PM10_2006_matrix[,2:5],4)
Multivariate skewness, as defined in Mori, Rohatgi e Szekely (1993).
PartialSkew(data)
PartialSkew(data)
data |
data matrix |
Vector |
The vector-valued skewness introduced by Mori et al (1993) |
Scalar |
The squared norm of Vector |
pvalue |
The probability of observing a value of Scalar greater than the observed one, when data are normally distributed |
Cinzia Franceschini and Nicola Loperfido
Mori T.F., Rohatgi V.K. and Szekely G.J. (1993). On multivariate skewness and kurtosis. Theory Probab. Appl. 38, 547-551.
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) PartialSkew(PM10_2006_matrix[,2:5])
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) PartialSkew(PM10_2006_matrix[,2:5])
The PM10 dataset provides an evaluation of PM10 (particulate matter with an aerodynamic equivalent diameter of up 10 m ) concentrations recorded in Italy during year 2006. The variables, collected from 257 stations, are: average (MEAN) and 50th percentile (MEDIAN) for stations which have valid data with a time coverage of at least 50; 98th percentile (98TH) and maximum value (MAX). Stations are classified by region, province and zone (rural, urban, suburban).
data("PM10_2006")
data("PM10_2006")
A data frame with 257 observations on the following 5 variables.
zone
a factor with levels R
S
U
mean
a numeric vector
median
a numeric vector
a numeric vector
max
a numeric vector
APAT (2007) Environmental data yearbook http:www.apat.gov.it site it-IT APAT Pubblicazioni Annuario_dei_Dati_Ambientali
Bartoletti, S. and Loperfido, N. (2010). Modelling Air Pollution Data by the Skew-Normal Distribution. Stochastic Environmental Research & Risk Assessment 24, 513-517.
Christiansen, M. and Loperfido, N. (2014). Improved Approximation of the Sum of Random Vectors by the Skew-Normal Distribution. Journal of Applied Probability 51, 466-482.
data(PM10_2006) ## maybe str(PM10_2006) ; plot(PM10_2006) ...
data(PM10_2006) ## maybe str(PM10_2006) ; plot(PM10_2006) ...
Computes the bootstrap distribution, its histogram and the corresponding p-value of the chosen measure of multivariate skewness (Mardia, Partial or Directional), using a given number of bootstrap replicates.
SkewBoot(data, replicates, units, type)
SkewBoot(data, replicates, units, type)
data |
data matrix |
replicates |
number of bootstrap replicates |
units |
number of rows in the data matrices sampled from the original data matrix |
type |
"Directional", "Partial" or "Mardia". If type is set equal to "Directional" or "Mardia", units is an integer greater than the number of variables. If type set equal to "Partial", units is an integer greater than the number of variables + 1 |
The function calls the package MaxSkew 1.1, which needs to be downloaded. The number of iterations required by the package MaxSkew is set equal to 5.
histogram |
plot of the above mentioned bootstrap distribution |
Pvalue |
p-value of the chosen skewness measure |
Vector |
vector containing the bootstrap replicates of the chosen skewness measure |
Cinzia Franceschini and Nicola Loperfido
library(MaxSkew) data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) #source("SkewBoot.R") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Partial") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Mardia") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Directional")
library(MaxSkew) data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) #source("SkewBoot.R") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Partial") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Mardia") #SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Directional")
Sum of squared elements in the third standardized cumulant of the data matrix.
SkewMardia(data)
SkewMardia(data)
data |
data matrix |
MardiaSkewness |
Squared norm of the third cumulant of the standardized data |
pvalue |
Probability of observing a value of MardiaSkewness greater than the observed one, when data are normally distributed. |
The measure has been introduced in Mardia, K.V. (1970)
Cinzia Franceschini and Nicola Loperfido
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications.Biometrika 57, 519-530.
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) SkewMardia(PM10_2006_matrix[,2:5])
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) SkewMardia(PM10_2006_matrix[,2:5])
It contains all moments of order three which can be obtained from the variables.
Third(data, type)
Third(data, type)
data |
data matrix |
type |
type="raw" is the third raw moment type="central" is the third central moment type="standardized" is the third standardized moment |
Some general information about the third multivariate moment of both theoretical and emprical distributions are reviewed in Loperfido, N. (2015).
Third moment: all moments of order three which can be obtained from the variables in "data".
Cinzia Franceschini and Nicola Loperfido
Loperfido, N. (2015). Singular Value Decomposition of the Third Multivariate Moment. Linear Algebra and its Applications 473, 202-216.
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) Third(PM10_2006_matrix[,2:5], "raw")
data(PM10_2006) PM10_2006_matrix<-data.matrix(PM10_2006) Third(PM10_2006_matrix[,2:5], "raw")