Confidence Interval on the Largest Eigenvalue of a Sample Covariance Matrix
Source:R/ci_eigenvalue.R
ci_eigenvalue.RdComputes an asymptotic confidence interval on the largest population eigenvalue \(\lambda_1\) of a population covariance matrix, given a sample covariance matrix from \(n\) observations on \(p\) variables under multivariate normality. Useful in principal-components analysis and dimension-reduction settings to gauge whether the largest eigenvalue is well-separated from the second.
Arguments
- cov_matrix
Sample covariance matrix (a symmetric, positive- semidefinite numeric matrix), or a data frame whose columns are the variables (in which case
cov_matrixis computed internally).- n
Sample size (number of rows of the original data). Required when
cov_matrixis supplied as a matrix; ignored whencov_matrixis a data frame (nrow(cov_matrix)is used instead).- conf_level
Confidence level. Default
0.95.- k
Which eigenvalue (1 = largest, 2 = next, ...) to bracket. Default
1.
Value
A 3-row data.frame with rows ordered
"lower_limit", "eigenvalue" (the sample eigenvalue point
estimate), and "upper_limit", so the point estimate sits between
its confidence limits.
Details
Asymptotic distribution. Under multivariate normality with eigenvalues \(\lambda_1 > \lambda_2 \ge \cdots \ge \lambda_p\), the sample eigenvalues \(\hat\lambda_j\) are asymptotically independent and approximately normal with mean \(\lambda_j\) and variance \(2 \lambda_j^2 / (n - 1)\) when the eigenvalues are simple (well-separated) (Anderson, 2003, Theorem 13.3.1; Muirhead, 1982, Section 9.7). The asymptotic CI is therefore $$\hat\lambda_j \cdot \exp\!\left(\pm z_{1 - \alpha/2} \sqrt{\frac{2}{n - 1}}\right),$$ on the multiplicative scale (equivalently, a Wald CI on \(\log \lambda_j\) with variance \(2/(n - 1)\)). The log scale is the natural variance-stabilizing transformation for an eigenvalue.
Caveats. The asymptotic CI assumes well-separated population eigenvalues. When the largest two eigenvalues are close, the sample eigenvalue exhibits a "repulsion" phenomenon and the CI is biased (typically too narrow). Diagnostic: if \(\hat\lambda_1 / \hat\lambda_2\) is close to 1, the asymptotic CI should not be relied upon; a bootstrap is preferable.
References
Anderson, T. W. (2003). An introduction to multivariate statistical analysis (4th ed.). Wiley. (See Chapter 13.)
Muirhead, R. J. (1982). Aspects of multivariate statistical theory. Wiley. (See Section 9.7.)
See also
Other multivariate and latent variable methods:
average_variance_extracted(),
bifactor_indices(),
cfa_1(),
cfa_2(),
cfa_k(),
common_method_marker(),
common_method_single_factor(),
dmacs(),
ecvi(),
htmt(),
irt_grm(),
irt_information(),
measurement_alignment(),
measurement_invariance(),
procrustes_phi(),
simple_structure()
Author
Ken Kelley kkelley@nd.edu
Examples
# 1. From a data frame:
set.seed(113)
X <- data.frame(matrix(rnorm(200), nrow = 50))
ci_eigenvalue(X, k = 1)
#> term value
#> lower_limit 0.925
#> eigenvalue 1.37
#> upper_limit 2.04
#>
#> Confidence level: 95%
# 2. From an explicit covariance matrix:
S <- cov(X)
ci_eigenvalue(S, n = nrow(X), k = 1)
#> term value
#> lower_limit 0.925
#> eigenvalue 1.37
#> upper_limit 2.04
#>
#> Confidence level: 95%