Computes 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.
ci_eigenvalue(cov_matrix, n = NULL, conf_level = 0.95, k = 1)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.
Sample covariance matrix (a symmetric, positive-
semidefinite numeric matrix), or a data frame whose columns are
the variables (in which case cov_matrix is computed
internally).
Sample size (number of rows of the original data). Required
when cov_matrix is supplied as a matrix; ignored when
cov_matrix is a data frame (nrow(cov_matrix) is
used instead).
Confidence level. Default 0.95.
Which eigenvalue (1 = largest, 2 = next, ...) to bracket.
Default 1.
Ken Kelley [email protected]
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.
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.)
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()
# 1. From a data frame:
set.seed(113)
X <- data.frame(matrix(rnorm(200), nrow = 50))
ci_eigenvalue(X, k = 1)
# 2. From an explicit covariance matrix:
S <- cov(X)
ci_eigenvalue(S, n = nrow(X), k = 1)
Run the code above in your browser using DataLab