Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: necessity v sufficiency


From   Kit Baum <[email protected]>
To   [email protected]
Subject   st: necessity v sufficiency
Date   Thu, 12 Jun 2003 09:40:41 -0400

Al wrote

Date: Wed, 11 Jun 2003 08:22:06 -0500
From: "FEIVESON, ALAN H. (AL) (JSC-SK) (NASA)" <[email protected]>
Subject: st: RE: Re: on symmetry

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


Many thanks to Alan for pointing out that necessity is not sufficiency (A-A' ==0 if symmetric), and v.v. The outtable routine (TeX from a Stata matrix), which made use of this flawed logic, has been revised (thanks to Nick Cox' noting of issym()) to handle this condition properly, and now only works in Stata version 8. The prior routine has been renamed outtable7, and warns when a matrix is assumed symmetric. If that is inappropriate, outtable7's nosym option will force it to treat the matrix as general. The outtable and outtable7 routines may be downloaded via ssc install outtable from SSC.

Please note that outtable(7) is complementary to statsmat of Cox and Baum (but may be used to output any Stata matrix, symmetric or not!)

Thanks
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/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index