s-news
[Top] [All Lists]

Re: solve

To: Abderrahim Oulhaj <abderrahim.oulhaj@pharmacology.oxford.ac.uk>, s-news@lists.biostat.wustl.edu
Subject: Re: solve
From: "Richard M. Heiberger" <rmh@temple.edu>
Date: Tue, 14 Dec 2004 14:02:32 -0500
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

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