The underlying facts may not be clear from this posting.
First, this is a user-written program on SSC. I am the author.
Second, this was originally written as a work-around for an
apparent limitation of -tabstat- (the official command). Data
are not saved by -tabstat- to a single matrix. There is
a very good reason for this: -tabstat- does not in general
emit a set of results that can be arrayed as a single matrix
without some pain or awkwardness
(for example, it could emit a three-dimensional array that
is groups X variables X statistics: that could be forced into
a matrix, but you would have to make sacrifices somewhere, e.g.
in row or column labelling). Nevertheless, there
are evidently are users who want to put their -tabstat-
results in a matrix for some reason or another.
Third, this is one of my least favourite programs. I only
ever use it when people find silly little bugs, as Zurab
seems to have done, and I need to fix it. So, here is an offer:
if anyone who uses it and who is also a Stata programmer
wants to take over its maintenance, then they can have it.
After all that:
Zurab: Please send me directly a code example with a standard
Stata dataset and your alternative program,
so that I can try to reproduce this problem and
work on it.
Nick
[email protected]
Zurab Sajaia
I have encountered a problem with -tabstatmat- being unable
to save the
matrix when there are many rows. The source of problem was
the line where
names of all matrices were collected in local vectors
local vectors "`vectors' r(Stat`i') \"
and then the output matrix is generated:
matrix `matout' = `vectors' r(Stat`I')
The problem is solved if we accumulate matrix directly in the loop:
matrix `matout'=nullmat(`matout') \ r(Stat`i') . And we'll
need to correct
following few lines where the totals matrix is added.
*
* 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/