Q: Problems with eigen() vs. svd()
Hi, I have a problem understanding what is going on with eigen() for nonsymmetric matrices. Example: h<-rnorm(6)
dim(h)<-c(2,3) c<-rnorm(6) dim(c)<-c(3,2) Pi<-h %*% c eigen(Pi)$values
[1] 1.56216542 0.07147773
svd(Pi)$d
[1] 2.85537780 0.03910517 And now:
Pi2<-Pi %*% t(Pi) #that means Pi2 is symmetric and the eigenvalues should be the
# squared eigenvalues of Pi
eigen(Pi2)$values
[1] 8.153182389 0.001529214
svd(Pi2)$d
[1] 8.153182389 0.001529214
Indeed:
diag(svd(Pi)$d) %*% diag(svd(Pi)$d)
[,1] [,2]
[1,] 8.153182 0.000000000
[2,] 0.000000 0.001529214
I conclude that eigen() works correctly for symmetric matrices only (or
makes sense ...).
Do I have misconceptions about the relationship between the results of
eigen()$values and
svd()$d and my conclusion is wrong ?
The VR-Book "Modern Applied Statistics" (1994) states explicitly that
eigen() is for
symmetric matrices.
Can anybody help me to clarify this point ?
Thank you
Ralph
------------------------------------------------------------------------------- There are three kinds of economists, those who can count and those who can't. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._