[R] COMPUTING DETERMINANT FROM SVD
Agus Salim
agus at stat.ucc.ie
Sat May 19 19:25:38 CEST 2001
Dear R-users,
I computed determinant of a square matrix "var.r" using the SVD output:
detr _ 1
d _ svd(var.r)$d
for (i in 1:length(d)) {
detr _ detr*d[i]
}
print(detr)
30.20886
BUT when I tried :
det(var.r)
I got :
-30.20886
Is this because SVD output will only give absolute of the eigenvalues ?, If
this is the case
how can I get the original eigenvalues?
Thanks,
Agus
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list