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

st: extracting diagonal elements from a matrix


From   Kate Ivanova <kivanova@usc.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: extracting diagonal elements from a matrix
Date   Sat, 16 Apr 2005 22:17:31 -0700

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/



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