Stafano:
The problem with computing inverses of matrices does not come from
exact singularity but with "ill conditioning", which essentially means
that round off becomes a major issue.
SUGGESTIONS:
1. Have you looked at the eigenvalues, e.g.,
"eigen(mymatrix)$values"?
2. Have you considered the Cholesky decomposition, "chol(mymatrix)"?
3. Have you considered using the binomial inverse theorem, a special
case of which has inverse(I + b*outer(one, one)) is of the form (I -
c*outer(one, one)), where "one" = the vector of all one's, for c =
b/(1+n*b).
Hope this helps,
Spencer Graves
Stefano Sofia wrote:
Dear Splus users,
I’ve got some problems about inverse of a symmetric matrix.
Be mymatrix a square symmetric matrix of dimension 13, with
0.51 in the diagonal
-0.04636364 everywhere else.
Within the library Matrix, the command solve(mymatrix) gives back the inverse
of mymatrix. But I realised that the output of solve is not the correct matrix
at all; first of all the output is not a symmetric matrix, and multiplying
mymatrix with this presumed inverse I get a matrix far from being the identity
matrix.
The determinant of mymatrix is very small (1.31649e-019) but still recognised
as greater than zero. Is that possible to improve the precision of the
calculations or the smallness of the determinant makes any improvement
impossible?
Am I using the right method for the inverse?
I’m using Splus4 in a Windows XP environment.
Any help will be greatly appreciated
Stefano
--------------------------------------------------------------------
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
|