[Rd] svd, La.svd (PR#1427)

kjetilh@umsanet.edu.bo kjetilh@umsanet.edu.bo
Mon, 1 Apr 2002 18:24:23 +0200 (MET DST)


(I tried to send this earlier, but it doesnt seem to have come through,
due to 
problems on my system)

Hola:

Both cannot be correct:

> m <- matrix(1:4, 2)
> svd(m)
$d
[1] 5.4649857 0.3659662

$u
           [,1]       [,2]
[1,] -0.5760484 -0.8174156
[2,] -0.8174156  0.5760484

$v
           [,1]       [,2]
[1,] -0.4045536  0.9145143
[2,] -0.9145143 -0.4045536

> La.svd(m)
$d
[1] 1.126182e-301 4.226051e-314

$u
            [,1]         [,2]
[1,] 0.002112565  0.999997769
[2,] 0.999997769 -0.002112565

$vt
           [,1]        [,2]
[1,] 7.5449e-13  1.0000e+00
[2,] 1.0000e+00 -7.5449e-13

as m is an invertible matrix, the results of La.svd seems wrong.

This is R1.4.1 on windows 98.

Kjetil Halvorsen

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._