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 <cinziafranceschini@msn.com> |
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. |
License: | GPL-2 |
Depends: | MaxSkew |
NeedsCompilation: | no |
Packaged: | 2017-06-24 10:15:39 UTC; Nicola |
Repository: | CRAN |
Date/Publication: | 2017-06-24 21:27:12 UTC |
MultiSkew
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
Details
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 <cinziafranceschini@msn.com>
License: GPL-2
References
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.
Examples
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")
Fisher's measure of skewness
Description
Computes Fisher's measure of skewness, that is the third standardized moment of each variable in the dataset
Usage
FisherSkew(data)
Arguments
data |
data matrix |
Value
Dataframe containing Fisher's measure of skewness of each variable of the dataset
Author(s)
Cinzia Franceschini and Nicola Loperfido
Examples
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
FisherSkew(PM10_2006_matrix)
MinSkew
Description
Reduces sample skewness by projecting the data onto appropriate linear subspaces
Usage
MinSkew(data, dimension)
Arguments
data |
data matrix |
dimension |
number of required projections |
Value
Linear |
linear function of the variables |
Projections |
projected data |
Author(s)
Cinzia Franceschini and Nicola Loperfido
References
Loperfido, N. (2014). Linear Transformations to Symmetry. Journal of Multivariate Analysis 129, 186-19
Examples
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
MinSkew(PM10_2006_matrix[,2:5],4)
PM10_2006: dataset
Description
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).
Usage
data("PM10_2006")
Format
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
- ‘98th’
a numeric vector
max
a numeric vector
Source
APAT (2007) Environmental data yearbook http:www.apat.gov.it site it-IT APAT Pubblicazioni Annuario_dei_Dati_Ambientali
References
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.
Examples
data(PM10_2006)
## maybe str(PM10_2006) ; plot(PM10_2006) ...
PartialSkew
Description
Multivariate skewness, as defined in Mori, Rohatgi e Szekely (1993).
Usage
PartialSkew(data)
Arguments
data |
data matrix |
Value
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 |
Author(s)
Cinzia Franceschini and Nicola Loperfido
References
Mori T.F., Rohatgi V.K. and Szekely G.J. (1993). On multivariate skewness and kurtosis. Theory Probab. Appl. 38, 547-551.
Examples
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
PartialSkew(PM10_2006_matrix[,2:5])
Bootstrap inference for multivariate skewness measures
Description
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.
Usage
SkewBoot(data, replicates, units, type)
Arguments
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 |
Details
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.
Value
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 |
Author(s)
Cinzia Franceschini and Nicola Loperfido
Examples
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")
Multivariate skewness as defined in Mardia (1970)
Description
Sum of squared elements in the third standardized cumulant of the data matrix.
Usage
SkewMardia(data)
Arguments
data |
data matrix |
Value
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. |
Note
The measure has been introduced in Mardia, K.V. (1970)
Author(s)
Cinzia Franceschini and Nicola Loperfido
References
Mardia, K.V. (1970), Measures of multivariate skewness and kurtosis with applications.Biometrika 57, 519-530.
Examples
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
SkewMardia(PM10_2006_matrix[,2:5])
Third multivariate moment of a data matrix
Description
It contains all moments of order three which can be obtained from the variables.
Usage
Third(data, type)
Arguments
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 |
Details
Some general information about the third multivariate moment of both theoretical and emprical distributions are reviewed in Loperfido, N. (2015).
Value
Third moment: all moments of order three which can be obtained from the variables in "data".
Author(s)
Cinzia Franceschini and Nicola Loperfido
References
Loperfido, N. (2015). Singular Value Decomposition of the Third Multivariate Moment. Linear Algebra and its Applications 473, 202-216.
Examples
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
Third(PM10_2006_matrix[,2:5], "raw")