| |
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: matsum - matrix sums of rows
Dear Statalist,
I've been using the -matsum- command written by Jeroen Weesie. I
would like to access the results (notably the sums of rows) to use
them in further operations: how can I do this? I've perused the help
and Statalist's archives, but I couldn't find a solution.
Example:
. matrix A=(1,2,3 \ 4,5,6)
. matrix list A
A[2,3]
c1 c2 c3
r1 1 2 3
r2 4 5 6
. matsum A, r(r) d
row-wise sums of matrix A[2,3]
c1
r1 6
r2 15
How can I access the sum of the first row of A (i.e. 6) and that of
the second row of A (i.e. 15)?
I'm still using Stata 7, but I should receive Stata 9 soon.
Thank you very much in advance,
Fabrizio Gilardi
------------------------------------------------------------
Fabrizio Gilardi, PhD
Institut d'Etudes Politiques et Internationales
Universit� de Lausanne
B�timent Humense
CH-1015 Lausanne
Phone +41 21 692 31 48
Fax + 41 21 692 31 45
[email protected]
http://wwwpeople.unil.ch/fabrizio.gilardi/
------------------------------------------------------------
*
* 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/