Learn R Programming

sirt (version 1.6-0)

eigenvalues.sirt: First Eigenvalues of a Symmetric Matrix

Description

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).

Usage

eigenvalues.sirt( X , D , maxit=200 , conv=10^(-6) )

Arguments

X
Symmetric matrix
D
Number of eigenvalues to be estimated
maxit
Maximum number of iterations
conv
Convergence criterion

Value

  • A list with following entries:
  • dVector of eigenvalues
  • uMatrix with eigenvectors in columns

References

Lange, K. (2010). Numerical Analysis for Statisticians. New York: Springer.

Examples

Run this code
Sigma <- diag(1,3)
Sigma[ lower.tri(Sigma) ] <- Sigma[ upper.tri(Sigma) ] <- c(.4,.6,.8 )
eigenvalues.sirt(X=Sigma, D=2 )
# compare with svd function
svd(Sigma)

Run the code above in your browser using DataLab