PCAasymp {ICtest} | R Documentation |
Testing for Subsphericity using the Covariance Matrix or Tyler's Shape Matrix
Description
The function tests, assuming an elliptical model, that the last p-k
eigenvalues of
a scatter matrix are equal and the k
interesting components are those with a larger variance.
The scatter matrices that can be used here are the regular covariance matrix and Tyler's shape matrix.
Usage
PCAasymp(X, k, scatter = "cov", ...)
Arguments
X |
a numeric data matrix with p>1 columns. |
k |
the number of eigenvalues larger than the equal ones. Can be between 0 and p-2. |
scatter |
the scatter matrix to be used. Can be |
... |
arguments passed on to |
Details
The functions assumes an elliptical model and tests if the last eigenvalues of PCA are equal. PCA can here be either be based on the regular covariance matrix or on Tyler's shape matrix.
For a sample of size , the test statistic is
where is the mean of the last
PCA eigenvalues.
The constant is for the regular covariance matrix estimated from the data whereas for Tyler's shape matrix it is simply a function of the dimension of the data.
The test statistic has a limiting chisquare distribution with degrees of freedom.
Note that the regular covariance matrix is here divided by and not by
.
Value
A list of class ictest inheriting from class htest containing:
statistic |
the value of the test statistic. |
p.value |
the p-value of the test. |
parameter |
the degrees of freedom of the test. |
method |
character string which test was performed. |
data.name |
character string giving the name of the data. |
alternative |
character string specifying the alternative hypothesis. |
k |
the number or larger eigenvalues used in the testing problem. |
W |
the transformation matrix to the principal components. |
S |
data matrix with the centered principal components. |
D |
the underlying eigenvalues. |
MU |
the location of the data which was substracted before calculating the principal components. |
SCATTER |
the computed scatter matrix. |
sigma1 |
the asymptotic constant needed for the asymptotic test. |
Author(s)
Klaus Nordhausen
References
Nordhausen, K., Oja, H. and Tyler, D.E. (2022), Asymptotic and Bootstrap Tests for Subspace Dimension, Journal of Multivariate Analysis, 188, 104830. <doi:10.1016/j.jmva.2021.104830>.
See Also
Examples
n <- 200
X <- cbind(rnorm(n, sd = 2), rnorm(n, sd = 1.5), rnorm(n), rnorm(n), rnorm(n))
TestCov <- PCAasymp(X, k = 2)
TestCov
TestTyler <- PCAasymp(X, k = 1, scatter = "tyler")
TestTyler