Thanks to Eric Zivot. So this is a common problem and one solution is to force
it to be symmetric.
-----Original Message-----
From: s-news-owner@lists.biostat.wustl.edu on behalf of Wang, Zhu
Sent: Mon 6/21/2004 11:07 AM
To: s-news@lists.biostat.wustl.edu
Cc:
Subject: [S] Problem in chol : Matrix must be symmetric
Hi Susers!
I am trying to use "chol" function of S-plus 6.1 on Windows, with a
matrix as following:
>tmp
tmp
[,1] [,2] [,3]
[1,] 46799.28 38622.46 15084.87
[2,] 38622.46 49606.19 40787.96
[3,] 15084.87 40787.96 50544.88
> chol(tmp)
chol(tmp)
Problem in chol(tmp): Matrix must be symmetric
This is not the only matrix I have with this error message. However it
does work for some matrix, e.g.,
> chol(matrix(c(2,2,2,2),ncol=2))
chol(matrix(c(2,2,2,2),ncol=2))
[,1] [,2]
[1,] 1.414214 1.414214e+000
[2,] 0.000000 1.883196e-008
attr(, "rank"):
[1] 2
BTW, I have used R without such a problem. I am wondering what happens
here.
Thanks,
Zhu Wang
Statistical Science Department
Southern Methodist University
Dallas, TX
--------------------------------------------------------------------
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
|