Sorry, figured it out myself. I could not find 'vecdiag' function before,
but now I have. Thanks, anyway.
Kate
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Kate Ivanova
Sent: Saturday, April 16, 2005 10:18 PM
To: [email protected]
Subject: st: extracting diagonal elements from a matrix
Hi,
I am using Stata 7 and have to create two new variables out of a square
matrix:
1) one variable consisting of the diagonal elements of a matrix
2) the other variable consisting of the row sum of all the elements
excluding the diagonal one
I would really appreciate any help with that.
Kate
*
* 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/