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

st: RE: -tabstatmat- and matrix row name with period

From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: -tabstatmat- and matrix row name with period
Date   Mon, 11 Jul 2005 18:36:00 +0100

Evidently, -tabstat- (official Stata)
includes code to cope with labels like this. 

-tabstatmat- (SSC) tries to do just one thing, 
take -tabstat-'s r-class results and produce
a matrix. But it cannot overcome Stata's 
inbuilt reluctance to use text from labels 
like this as matrix row or column names. 

Stata 8.2 being part of history, there will certainly
be no fixes or upgrades to take care of this problem
as far as official matrices are concerned. In principle, 
that might be done in Stata 9 up. 

I wrote -tabstatmat-, inspired by a problem
you suggested. I guess that it could be modified 
to use values whenever the labels are not 
acceptable, but at this moment it doesn't seem 
worth the time. 

Feel free to take over the program. 

[email protected] 

Friedrich Huebler
> I have Stata 8.2. Is it possible to create a matrix row name that
> contains a period? [U] 17.2 on matrix row and column names indicates
> that a row name can contain a period when it has the form
> ts_operator.subname. I encountered this problem when I tried
> -tabstatmat- (available at SSC) with a variable whose labels indicate
> ranges like "0 to 9.9" or "10 to 19.9".
> . sysuse auto, clear
> . lab def foreign 0 "0 to 9.9"
> . lab val foreign foreign
> . tabstat mpg, by(foreign) save
> . set trace on
> . tabstatmat mat
> = matrix rownames mat =  `"0 to 9.9"' `"1"' Total
> 0to9:  operator invalid
> ------------------------------ end tabstatmat ---
> r(198);
> Can -matrix rownames- accept a period and is it then possible to
> change tabstatmat.ado accordingly?

*   For searches and help try:

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