HufferPark {ellipticalsymmetry}R Documentation

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

[Package ellipticalsymmetry version 0.1.2 Index]