Hello List, i need help for eigen and svd functions. I have a non-symmetric square matrix. These matrix is not positive (some eigenvalues are negative). I want to diagonalise these matrix. So, I use svd and eigen and i compare the results. eigen give me the "good" eigenvalues (positive and negative). I compare with another software and the results are the same. BUT, when i use svd, the results are completely different (no sign and not the same value). I thought that svd is a generalisation of eigen for non-square matrices but apparently, there are more differences ? I 've R1.2.3 on W2000. Thanks in advance. -- St?phane DRAY --------------------------------------------------------------- Biom?trie et Biologie ?volutive - Equipe "?cologie Statistique" Universite Lyon 1 - Bat 711 - 69622 Villeurbanne CEDEX - France Tel : 04 72 43 27 56 Fax : 04 78 89 27 19 04 72 43 27 57 E-mail : dray at biomserv.univ-lyon1.fr --------------------------------------------------------------- ADE-4 http://pbil.univ-lyon1.fr/ADE-4/ADE-4F.html --------------------------------------------------------------- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
The singular values of a matrix A are the +ve square roots of the eigenvalues of A'A, or AA' (depending on the shape of A), where A' is transpose of A. e.g....> A<-matrix(rnorm(10),2,5) > svd(A)$d[1] 1.6157235 0.9652578> eigen(A%*%t(A))$values^0.5[1] 1.6157235 0.9652578 Simon> Hello List, > i need help for eigen and svd functions. I have a non-symmetric > square matrix. These matrix is not positive (some eigenvalues are > negative). I want to diagonalise these matrix. So, I use svd and > eigen and i compare the results. eigen give me the "good" eigenvalues > (positive and negative). I compare with another software and the > results are the same. BUT, when i use svd, the results are completely > different (no sign and not the same value). I thought that svd is a > generalisation of eigen for non-square matrices but apparently, there > are more differences ? > I 've R1.2.3 on W2000.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._