Package 'ellipticalsymmetry'

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

Help Index


Huffer and Park's test for elliptical symmetry

Description

Pearson chi-square type test for elliptical symmetry.

Usage

HufferPark(X, c, R = NA, sector = "orthants", g = NA, nJobs = -1)

Arguments

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 "orthants", "permutations" and "bivariateangles".

g

A parameter that is used if sector = "bivariateangles". It denotes the number of regions used to divide the plane.

nJobs

The number of CPU cores used for the calculation. The default value -1 indicates that all cores except one are used.

Details

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 2(m1)π/g2(m-1)\pi/g and 2mπ/g2m\pi/g for mm in (1,...,g)(1,..., g). If sector is set to "orthants", then g is fixed and equal to 2d2^d, while for sector = "permutations" g is dd!. 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 n/(gc)n/(gc) 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.

Value

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.

References

Huffer, Fred W., & Park, C., (2007). A test for elliptical symmetry. Journal of Multivariate Analysis, 98(2), 256-281.

Examples

## 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)

Koltchinskii and Sakhanenko's test for elliptical symmetry

Description

Test for elliptical symmetry.

Usage

KoltchinskiiSakhanenko(X, R = 1000, nJobs = -1)

Arguments

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.

Value

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.

Background

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.

References

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.

Examples

## 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 by A. Manzotti, F. J. Pérez, and A. J. Quiroz.

Description

Test for elliptical symmetry based on the averages of spherical harmonics.

Usage

MPQ(X, epsilon = 0.05)

Arguments

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.

Value

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.

Background

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.

References

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.

Examples

## sepal width and length of the versicolor subset of the Iris data
X = datasets::iris[51:100,1:2]

MPQ(X)

Pseudo-Gaussian test for elliptical symmetry

Description

Tests for elliptical symmetry: specified and unspecified location.

Usage

PseudoGaussian(X, location = NA)

Arguments

X

A numeric matrix.

location

A vector of location parameters.

Details

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.

Value

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.

Background

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.

References

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.

Examples

## sepal width and length of the versicolor subset of the Iris data
X = datasets::iris[51:100,1:2]

PseudoGaussian(X)

Schott's test for elliptical symmetry

Description

Test for elliptical symmetry.

Usage

Schott(X)

Arguments

X

A numeric matrix.

Value

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.

Background

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.

References

Schott, James R., (2002). Testing for elliptical symmetry in covariance-matrix-based analyses. Statistics & Probability Letters, 60(4), 395-404.

Examples

## 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 by Babic et al.

Description

Tests for elliptical symmetry: specified and unspecified location.

Usage

SkewOptimal(X, location = NA, f = "t", param = NA)

Arguments

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 "t", "logistic" and "powerExp". The default is set to "t".

param

A parameter that is used when f = "t" and f = "powerExp". The default value of param represents the degrees of freedom of the multivariate t distribution and it is set to 4.

Details

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.

Value

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.

Background

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.

References

Babic, S., Gelbgras, L., Hallin, M., & Ley, C. (2021). Optimal tests for elliptical symmetry: specified and unspecified location. Bernoulli (in press).

Examples

## 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")