Learn R Programming

ICtest (version 0.3-8)

PCAlrt: Testing for Subsphericity using the Likelihood Ratio Test

Description

Tests the equality of the last p-k eigenvalues of the covariance matrix using the likelihood ratio test for normal data with the Bartlett-Lawley correction.

Usage

PCAlrt(X, k)

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 mean vector of the data which was substracted before calculating the principal components.

SCATTER

the computed covariance matrix matrix.

Arguments

X

a numeric data matrix with p>1 columns and more rows than columns.

k

the number of eigenvalues larger than the equal ones. Can be between 0 and p-2.

Author

Klaus Nordhausen

Details

Let \(l_1 \geq \ldots \geq l_p\) be the eigenvalues of the sample covariance matrix of the n observations, \(q = p-k\) and \(\bar l\) the mean of the last q eigenvalues. The test statistic is $$T = c_n \left(q \log \bar l - \sum_{i=k+1}^p \log l_i\right)$$ with the Bartlett-Lawley correction factor $$c_n = n - 1 - k - \frac{1}{6}\left(2q + 1 + \frac{2}{q}\right) + \bar l^2 \sum_{i=1}^k \frac{1}{(l_i - \bar l)^2}.$$ Under the null hypothesis and for normal data, \(T\) has asymptotically a chisquare distribution with \(q(q+1)/2-1\) degrees of freedom when n goes to infinity.

The test requires n > p. The chisquare approximation is good when p is small compared to n but the test becomes increasingly liberal when p grows with n, see Schott (2006). In that case PCAschott should be used.

References

Bartlett, M.S. (1950), Tests of Significance in Factor Analysis, British Journal of Statistical Psychology, 3, 77--85. <doi:10.1111/j.2044-8317.1950.tb00285.x>

Lawley, D.N. (1956), Tests of Significance for the Latent Roots of Covariance and Correlation Matrices, Biometrika, 43, 128--136. <doi:10.1093/biomet/43.1-2.128>

Schott, J.R. (2006), A High-Dimensional Test for the Equality of the Smallest Eigenvalues of a Covariance Matrix, Journal of Multivariate Analysis, 97, 827--843. <doi:10.1016/j.jmva.2005.05.003>

See Also

PCAschott, PCAasymp, PCAboot

Examples

Run this code
n <- 200
X <- cbind(rnorm(n, sd = 2), rnorm(n, sd = 1.5), rnorm(n), rnorm(n), rnorm(n))
PCAlrt(X, 2)

Run the code above in your browser using DataLab