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

st: RE: Matrix calculation


From   "Steichen, Thomas" <[email protected]>
To   <[email protected]>
Subject   st: RE: Matrix calculation
Date   Fri, 6 Sep 2002 16:24:23 -0400

I believe the problem is that syminv(A) requires that A be 
positive definite to generate a normal inverse. Your A is 
not positive definite, so syminv(A) returns a g2 inverse.


> -----Original Message-----
> From: Jiang, Tao [mailto:[email protected]] 
> Sent: Friday, September 06, 2002 3:57 PM
> To: '[email protected]'
> Subject: st: Matrix calculation
> 
> 
> I was doing some matrices calculation, but got some problem.  
> What I had is
> a simple matrix:
> 
> A = (1,2\2,1)
> 
> and if I do B = inv(A), I got the correct matrix; if I do B = 
> syminv(A),
> I got the following:
> 
> . mat A = (1,2\2,1)
> . mat list A
> 
> symmetric A[2,2]
>     c1  c2
> r1   1
> r2   2   1
> . mat iA=syminv(A)
> 
> . mat list iA
> 
> symmetric iA[2,2]
>     r1  r2
> c1   1
> c2   0   0
> 
> Is there some reason why?
> *
> *   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/
> 
CONFIDENTIALITY NOTE:  This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information.  If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system.  Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.




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