user2080209
user2080209

Reputation: 779

How to find singular matrix eigenvector?

I have a 800x800 singular (covariance) matrix and I want to find it's largest eigenvalue and eigenvector corresponding to this eigenvalue. Does anybody know wheter it is possible to do it with R?

Upvotes: 0

Views: 1838

Answers (1)

Marc in the box
Marc in the box

Reputation: 11995

Here is an example of using svd for the decomposition of a covariance matrix:

a <- matrix(runif(16),4)
C <- cov(a)
res <- svd(C)
res
res$d[1] # largest singular value
res$u[,1] # largest vector ; u and v are the same

Hope that helps.

Upvotes: 1

Related Questions