Kit - I don't think this works very well - consider
. matrix A = (10,4,2 \ 3,10,5 \ 1,6,10)
. matrix list A
A[3,3]
c1 c2 c3
r1 10 4 2
r2 3 10 5
r3 1 6 10
. matrix D=A-A'
. matrix list D
D[3,3]
r1 r2 r3
c1 0 1 1
c2 -1 0 -1
c3 -1 1 0
. di det(D)
0
Al Feiveson
-----Original Message-----
From: Christopher F Baum [mailto:[email protected]]
Sent: Wednesday, June 11, 2003 6:06 AM
To: [email protected]
Subject: st: Re: on symmetry
On Wednesday, June 11, 2003, at 02:33 AM, David wrote:
> Instead, I'd suggest that Stata develop an internally created and
> maintained
> property for matrices that indicates whether or not it is symmetric.
I ran into this issue a while back when developing outtable, which
outputs a matrix as a lower triangle iff symmetric. I thought there was
a way to access the internal identifier by which Stata stores only the
lower triangle for a matrix which it considers symmetric (e.g. a
covariance or correlation matrix). After consulting with Stata's
developers, no such luck (there is (or was) no user access to that
flag). They suggested that I use the condition
det(mat - mat') to determine whether the matrix was numerically
symmetric, which is the test employed by outtable.
Kit
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/