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

ripley@stats.ox.ac.uk ripley@stats.ox.ac.uk
Mon, 1 Apr 2002 18:33:21 +0200 (MET DST)


Already sent, already corrected.


On Mon, 1 Apr 2002 kjetilh@umsanet.edu.bo wrote:

> (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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._