Re: R-alpha: svd

Gregory R. Warnes (warnes@biostat.washington.edu)
Fri, 13 Dec 1996 16:51:23 -0800 (PST)


Date: Fri, 13 Dec 1996 16:51:23 -0800 (PST)
From: "Gregory R. Warnes" <warnes@biostat.washington.edu>
To: Ellis / Gilbert <la-jassine@aix.pacwan.net>
Subject: Re: R-alpha: svd
In-Reply-To: <1361602670-885614@pacwan.mm-soft.fr>


The easiest way in Splus to get the inverse appears to be 
	solve(X)
which also works in R.  It is also probably faster than the multiplication 
you've given--if not it should be.

On Fri, 13 Dec 1996, Ellis / Gilbert wrote:

> In S, as I recall, the inverse of an arbitrary square matrix  X can be found by
>      v <- svd(X)
>      inv.X <-  v$u  %*%  diag(v$d)  %*%  t(v$v)
> 
> but in R it appears to be
>      inv.X <-  v$v  %*%  diag(v$d)  %*%  t(v$u)
> 
> with u and v switched. I don't have S available. Perhaps someone could
> verify if this is a bug.
> 
> Thanks.
> 
> Paul Gilbert
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> r-testers mailing list -- For info or help, send "info" or "help",
> To [un]subscribe, send "[un]subscribe"
> (in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> 


-------------------------------------------------------------------------------
    Gregory R. Warnes          | It is high time that the ideal of success
warnes@biostat.washington.edu  |  be replaced by the ideal of service.
                               |                       Albert Einstein
-------------------------------------------------------------------------------

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-