View source: R/sirt_eigenvalues.R
sirt_eigenvalues | R Documentation |
This function computes the first D
eigenvalues and eigenvectors of a
symmetric positive definite matrices. The eigenvalues are computed
by the Rayleigh quotient method (Lange, 2010, p. 120).
sirt_eigenvalues( X, D, maxit=200, conv=10^(-6) )
X |
Symmetric matrix |
D |
Number of eigenvalues to be estimated |
maxit |
Maximum number of iterations |
conv |
Convergence criterion |
A list with following entries:
d |
Vector of eigenvalues |
u |
Matrix with eigenvectors in columns |
Lange, K. (2010). Numerical Analysis for Statisticians. New York: Springer.
Sigma <- diag(1,3)
Sigma[ lower.tri(Sigma) ] <- Sigma[ upper.tri(Sigma) ] <- c(.4,.6,.8 )
sirt::sirt_eigenvalues(X=Sigma, D=2 )
# compare with svd function
svd(Sigma)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.