Title: | Elliptical Symmetry Tests |
---|---|
Description: | Given the omnipresence of the assumption of elliptical symmetry, it is essential to be able to test whether that assumption actually holds true or not for the data at hand. This package provides several statistical tests for elliptical symmetry that are described in Babic et al. (2021) <arXiv:2011.12560v2>. |
Authors: | Sladana Babic [aut] , Marko Palangetic [aut, cre] , Christophe Ley [aut] |
Maintainer: | Marko Palangetic <[email protected]> |
License: | GPL-3 |
Version: | 0.1.2 |
Built: | 2024-11-27 06:40:35 UTC |
Source: | CRAN |
Pearson chi-square type test for elliptical symmetry.
HufferPark(X, c, R = NA, sector = "orthants", g = NA, nJobs = -1)
HufferPark(X, c, R = NA, sector = "orthants", g = NA, nJobs = -1)
X |
A numeric matrix. |
c |
The number of spherical shells that are used to divide the space. |
R |
The number of bootstrap replicates. |
sector |
A string that specifies the type of sectors used to divide the space. Currently supported options are |
g |
A parameter that is used if |
nJobs |
The number of CPU cores used for the calculation. The default value -1 indicates that all cores except one are used. |
Huffer and Park (2007) propose a Pearson chi-square type test with multi-dimensional cells.
After dividing the space into c
spherical shells and g
sectors (in total gc
cells),
and after determining the observed cell counts, the test statistic is easily computed.
sector
is an option that allows the user to specify the type of sectors used to divide the space.
Currently supported options are "orthants"
, "permutations"
and "bivariateangles"
,
the last one being available only in dimension 2. The g
argument indicates the number of sectors.
The user has to choose g
only if sector = "bivariateangles"
and it denotes the number of regions used to divide the plane.
In this case, regions consist of points whose angle in polar coordinates is between and
for
in
.
If
sector
is set to "orthants"
, then g
is fixed and equal to , while for
sector = "permutations"
g
is !.
No matter what type of sectors is chosen, the user has to specify the number of spherical shells that are used to divide the space, which is
c
.
The value of c
should be such that the average cell counts are not too small.
The asymptotic distribution is available only under sector = "orthants"
when the underlying distribution is close to normal.
Otherwise, bootstrap procedures are required and the user can freely choose the number of bootstrap replicates, denoted as R
.
Note that by default sector
is set to "orthants"
and R = NA
, which means that the non-bootstrap version of the test
will be performed unless the user specifies R
.
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
Huffer, Fred W., & Park, C., (2007). A test for elliptical symmetry. Journal of Multivariate Analysis, 98(2), 256-281.
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] ## the non-bootstrap test HufferPark(X, c = 2) ## the bootstrap tests HufferPark(X, c = 2, R = 10, sector="orthants", nJobs=2) HufferPark(X, c = 2, R = 10, sector="bivariateangles", g = 3, nJobs=2) HufferPark(X, c = 2, R = 10, sector="permutations", nJobs=2)
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] ## the non-bootstrap test HufferPark(X, c = 2) ## the bootstrap tests HufferPark(X, c = 2, R = 10, sector="orthants", nJobs=2) HufferPark(X, c = 2, R = 10, sector="bivariateangles", g = 3, nJobs=2) HufferPark(X, c = 2, R = 10, sector="permutations", nJobs=2)
Test for elliptical symmetry.
KoltchinskiiSakhanenko(X, R = 1000, nJobs = -1)
KoltchinskiiSakhanenko(X, R = 1000, nJobs = -1)
X |
A numeric matrix. |
R |
The number of bootstrap replicates. |
nJobs |
The number of CPU cores used for the calculation. The default value -1 indicates that all cores except one are used. |
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
Koltchinskii and Sakhanenko (2000) proposed a class of omnibus bootstrap tests for elliptical symmetry that are affine invariant and consistent against any fixed alternative. This test is based on spherical harmonics.
Koltchinskii, V., & Sakhanenko, L., (2000). Testing for ellipsoidal symmetry of a multivariate distribution. High Dimensional Probability II, 493-510, Springer.
Sakhanenko, L., (2008). Testing for ellipsoidal symmetry: A comparison study. Computational Statistics & Data Analysis, 53(2), 565-581.
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] KoltchinskiiSakhanenko(X, R = 10, nJobs=2)
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] KoltchinskiiSakhanenko(X, R = 10, nJobs=2)
Test for elliptical symmetry based on the averages of spherical harmonics.
MPQ(X, epsilon = 0.05)
MPQ(X, epsilon = 0.05)
X |
A numeric matrix. |
epsilon |
A value which indicates the proportion of points close to the origin which will not be used in the calculation. Default is set to 0.05. |
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
Test for elliptical symmetry based on spherical harmonics of degrees 3 and 4. The test statistic involves the averages of spherical harmonics over the projections of the scale residuals on the unit sphere. This test requires moments of order 4, it has a simple asymptotic distribution but does not have asymptotic power 100% against all alternatives.
Manzotti, A., Perez, Francisco J., & Quiroz, Adolfo J. (2002). A statistic for testing the null hypothesis of elliptical symmetry. Journal of Multivariate Analysis, 81(2), 274-285.
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] MPQ(X)
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] MPQ(X)
Tests for elliptical symmetry: specified and unspecified location.
PseudoGaussian(X, location = NA)
PseudoGaussian(X, location = NA)
X |
A numeric matrix. |
location |
A vector of location parameters. |
Note that location
allows the user to specify the known location.
The default is set to NA
which means that the unspecified location test will be performed unless the user specifies location.
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
Pseudo-Gaussian tests for elliptical symmetry are based on Le Cam’s theory of statistical experiments. They are most efficient against a multivariate form of Fechner-type asymmetry. These tests require finite moments of order 4 and they have a simple asymptotic chi-squared distribution under the null hypothesis of ellipticity.
Cassart, D., Hallin, M. & Paindaveine, D., (2008). Optimal detection of Fechner-asymmetry. Journal of Statistical Planning and Inference, 138, 2499-2525.
Cassart, D., (2007). Optimal tests for symmetry. Ph.D. thesis, Univ. libre de Bruxelles, Brussels.
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] PseudoGaussian(X)
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] PseudoGaussian(X)
Test for elliptical symmetry.
Schott(X)
Schott(X)
X |
A numeric matrix. |
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
A Wald-type test for elliptical symmetry based on fourth moments. It compares the sample fourth moments with the expected theoretical ones under ellipticity. Being based on fourth-order moments, the test is very simple to use but requires moments of order 8. It has an asymptotic chi-squared distribution under the null hypothesis of ellipticity.
Schott, James R., (2002). Testing for elliptical symmetry in covariance-matrix-based analyses. Statistics & Probability Letters, 60(4), 395-404.
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] Schott(X)
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] Schott(X)
Tests for elliptical symmetry: specified and unspecified location.
SkewOptimal(X, location = NA, f = "t", param = NA)
SkewOptimal(X, location = NA, f = "t", param = NA)
X |
A numeric matrix. |
location |
A vector of location parameters. |
f |
A string that specifies the type of the radial density upon which the test is based. Currently supported options are |
param |
A parameter that is used when |
X
and location
are the only input arguments for the specified location test.
The default value for location
is set to NA
which implies that the unspecified location test will be performed
unless the user specifies location.
For the unspecified location test, besides the data matrix X
, the input arguments are f
and param
.
The f
argument is a string that specifies the type of the radial density upon which the test is based.
Currently supported options are: "t"
for the radial density of the multivariate t distribution,
"logistic"
for the multivariate logistic and "powerExp"
for the radial density of the multivariate power-exponential distribution.
Note that the default is set to "t"
.
The role of the param
argument is as follows.
If f = "t"
then param
denotes the degrees of freedom of the multivariate t distribution.
Given that the default radial density is "t"
, it follows that the default value of param
represents the degrees of freedom of the multivariate t distribution and it is set to 4.
Note also that the degrees of freedom have to be greater than 2.
If f = "powerExp"
then param
denotes the kurtosis parameter. In that case the value of param
has to be different from 1, because for the multivariate power exponential distribution, a kurtosis parameter equal to 1 corresponds
to the multivariate Gaussian distribution (the Gaussian f
is excluded due to a singular Fisher information matrix).
The default value is set to 0.5.
An object of class "htest"
containing the following components:
statistic |
The value of the test statistic. |
pvalue |
The p-value of the test. |
alternative |
A character string describing the alternative hypothesis. |
method |
A character string indicating what type of test was performed. |
Tests for elliptical symmetry both for specified and unspecified location. These tests are based on Le Cam’s theory of statistical experiments and they are optimal against generalized skew-elliptical alternatives, but they remain quite powerful under a much broader class of non-elliptical distributions. They have a simple asymptotic chi-squared distribution under the null hypothesis of ellipticity, they are affine-invariant, computationally fast, have a simple and intuitive form, only require finite moments of order 2.
Babic, S., Gelbgras, L., Hallin, M., & Ley, C. (2021). Optimal tests for elliptical symmetry: specified and unspecified location. Bernoulli (in press).
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] ## location unspecified test based on the radial density of the multivariate t distribution SkewOptimal(X) ## location unspecified test based on the radial density of the logistic distribution SkewOptimal(X, f="logistic") ## location unspecified test based the radial density of the power exponential distribution SkewOptimal(X, f="powerExp")
## sepal width and length of the versicolor subset of the Iris data X = datasets::iris[51:100,1:2] ## location unspecified test based on the radial density of the multivariate t distribution SkewOptimal(X) ## location unspecified test based on the radial density of the logistic distribution SkewOptimal(X, f="logistic") ## location unspecified test based the radial density of the power exponential distribution SkewOptimal(X, f="powerExp")