On Fri, 26 Feb 1999, Haicheng Tang wrote:
> The following matrix looks OK for me. But Splus
> considers it singular when I tried to invert it.
> Is there any way to loosen its criteria for
> singularity? Any help is appreciated!
>
> [,1] [,2]
> [1,] 6.944678 6.940456
> [2,] 6.940456 6.940456
How are you trying to do this?
> A <- matrix(c(6.944678, 6.940456, 6.940456, 6.940456), 2, 2)
> solve(A)
[,1] [,2]
[1,] 236.8546 -236.8546
[2,] -236.8546 236.9987
> svd(A)
$d:
[1] 13.883023321 0.002110679
It is far from singular, if somewhat ill-conditioned.
BTW, I asked kappa for the condition number (which should be
13.883023321/0.002110679, approximately 6500) and get
> kappa(A)
[1] 3.332253
Beware that kappa() does not give sensible answers given a matrix unless it
is (upper?) triangular. That seems like a serious bug to me (still there in
5.0).
--
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
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|