s-news
[Top] [All Lists]

Re: solve

To: Abderrahim Oulhaj <abderrahim.oulhaj@pharmacology.oxford.ac.uk>
Subject: Re: solve
From: Eva Cantoni <Eva.Cantoni@metri.unige.ch>
Date: Wed, 15 Dec 2004 10:53:06 +0100
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <012601c4e20b$75a08bf0$adca01a3@optima.ox.ac.uk>
References: <012601c4e20b$75a08bf0$adca01a3@optima.ox.ac.uk>
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3.1) Gecko/20030508
I don't know the exact technical details, but I experienced the fact that the function solve.Matrix() of the library(Matrix) in Splus has a higher tolerance than solve() (in Splus also).

Best regards,
Eva


Richard M. Heiberger wrote:

Your example is very badly conditioned

A <- matrix(c(613537.28025, -49.536866569,-49.53687, 0.004000337),nrow = 2, 
byrow=TRUE)

eigen(A)
$values:
[1] 6.135373e+005 7.408900e-007

$vectors:
[,1] [,2] [1,] 0.99999999674 0.00008073978
[2,] -0.00008073979 0.99999999674


The ratio of eigenvalues is 10^12.

S-Plus solve is using a tolerance of 1e-7 (in qr.default)
R solve is using a tolerance of 2e-16 (in solve.default)

Rich
--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


--

Dr Eva Cantoni                 phone  : (+41) 22 379 8240
Econométrie - Univ. Genève     fax    : (+41) 22 379 8299
40, Bd du Pont d'Arve          e-mail : Eva.Cantoni@metri.unige.ch
CH-1211 Genève 4 http://www.unige.ch/ses/metri/cantoni




<Prev in Thread] Current Thread [Next in Thread>