Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: matrix problem

From   Richard Goldstein <>
To   statalist <>
Subject   st: matrix problem
Date   Wed, 15 May 2013 11:04:34 -0400

Hi all,

I am using Newson's -somersd- command (from ssc); results, including the
piece I want, are saved in a matrix and I can list that matrix:

. mat list r(table)

     b  .62563699
    se  .00834334
     t  74.986391
pvalue  3.73e-257
    ll  .60924043
    ul  .64203354
    df        452
  crit  1.9652262
 eform          0

My problem comes in attempting to use the [1,1] term (.62563699 here);
for example, I can't seem to list it:

. matrix li r(table)[1,1]
[ invalid name
matrix [1,1] not found

and I can't do what I want to do - add this value to a scalar:

scalar cstat=cstat+r(table)[1,1]
invalid syntax

note that cstat is not the problem as it is defined (as 0) prior to
entering my loop

clearly I am doing something wrong but I have been unable to figure out
what it is or how to fix it

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index