computeApproxNormSquaredEigenvector | R Documentation |
Approximates the normed squared eigenvector loadings using a simplified version of the formula associating normed squared eigenvector loadings with the eigenvalues of the full matrix and sub-matrices.
computeApproxNormSquaredEigenvector(cov.X, v1, lambda1, max.iter=5, lambda.diff.threshold=1e-6, trace=FALSE)
cov.X |
Covariance matrix. |
v1 |
Principal eigenvector of |
lambda1 |
Largest eigenvalue of |
max.iter |
Maximum number of iterations for power iteration method when computing sub-matrix eigenvalues.
See description |
lambda.diff.threshold |
Threshold for exiting the power iteration calculation.
See description |
trace |
True if debugging messages should be displayed during execution. |
Vector of approximate normed squared eigenvector loadings.
eespca
,powerIteration
set.seed(1) # Simulate 10x5 MVN data matrix X=matrix(rnorm(50), nrow=10) # Estimate covariance matrix cov.X = cov(X) # Compute eigenvectors/values eigen.out = eigen(cov.X) v1 = eigen.out$vectors[,1] lambda1 = eigen.out$values[1] # Print true squared loadings v1^2 # Compute approximate normed squared eigenvector loadings computeApproxNormSquaredEigenvector(cov.X=cov.X, v1=v1, lambda1=lambda1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.