SmoothECTest: Smooth Goodness-of-fit Test for Multivariate Elliptical...

Description Usage Arguments Value Author(s) References Examples

Description

Smooth tests of goodness-of-fit for multivariate elliptical distributions with diagnostic (Dx) capabilities and full invariance to affine-linear transformations. By increasing the value of the hyperparameter K, the test and the Dx become adaptively consistent against an increasing number of departures from the null model. The Dx pertains to elements R and U of the Cambanis, Huang & Simons stochastic representation of elliptical data. Note that p-values can be computed via an asymptotic chi-square approximation or by Monte Carlo.

Usage

1
SmoothECTest(data, K = 7, family = "MVN", Est.Choice = "", Cpp = TRUE)

Arguments

data

The data set to use. Cases with missing values are removed.

K

Integer. Hyperparameter controlling the size of the embedding family. Should be greater than or equal to 3 for the Multivariate Normal Distribution. The computation time increases with the size of the data frame and K . Please be patient.

family

The only family available in the current version of the package is the Multivariate Normal Distribution.

Est.Choice

Not used yet. Maximum Likelihood Estimation (MLE) or Method of moments. Currently, only the MLE is implemented.

Cpp

Logical. If TRUE, the faster C++ code is used.

Value

List with components:

Q

The global test statistic with hyperparameter K.

dfQ

Degrees of freedom of the asymptotic chi-square approximation.

pval.asymp.Q

Asymptotic p-value for Q.

Uscaled

Scaled component U(s)_K tests the uniformity of element U.

dfU

Degrees of freedom of the asymptotic chi-square approximation.

pval.asymp.U

Asymptotic p-value for Uscaled.

Iscaled

Scaled component I(s)_K tests the correlation between R and U.

dfI

Degrees of freedom of the asymptotic chi-square approximation.

pval.asymp.I

Asymptotic p-value for Iscaled.

Rscaled

Scaled component R(s)_K test the distribution of element R, radius of the data.

dfR

Degrees of freedom of the asymptotic chi-square approximation.

pval.asymp.R

Asymptotic p-value for Rscaled.

Author(s)

G. R. Ducharme, P. Lafaye De Micheaux

References

Gilles R. Ducharme, Pierre Lafaye de Micheaux (2019). A Goodness-of-fit Test for Elliptical Distributions with Diagnostic Capabilities. ArXiv pre-print. https://arxiv.org/abs/1902.03622

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
 # The famous (Fisher's or Anderson's) iris data set
 # Increase the value of K to K = 7 for better results.
  ressetosa <- SmoothECTest(iris[1:50, -5], K = 3)
  ressetosa

 # Examination marks (n = 88) in Vectors, Algebra and Statistics from the "Open
 # book-Closed book examination" data set (Mardia, Kent and Bibby, 1979,
 # p. 3-4).
 # Increase the value of K to K = 5 for better results.
  data <- scor[, c(2, 3, 5)]
  result <- SmoothECTest(data, K = 3)
  result

Example output

Loading required package: orthopolynom
Loading required package: polynom
Loading required package: bootstrap


 Smooth Test of H0 : X ~ MVN   (K = 3, n * p = 50 * 4)

           Stat df p.val.Chi2 Interpretation
Q        25.664 20     0.1772         Global
U-scaled 14.432 16     0.5666        U dist.
I-scaled  5.088  4     0.2783       cor(R,U)
R-scaled      0  0       <NA>        R dist.


 Smooth Test of H0 : X ~ MVN   (K = 3, n * p = 88 * 3)

           Stat df p.val.Chi2 Interpretation
Q        28.672 10     0.0014         Global
U-scaled 11.896  7      0.104        U dist.
I-scaled 12.038  3     0.0073       cor(R,U)
R-scaled      0  0       <NA>        R dist.

ECGofTestDx documentation built on May 2, 2019, 2:33 a.m.