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

st: Re: How to change matrix row names

From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Re: How to change matrix row names
Date   Mon, 1 Nov 2004 14:46:30 -0800 (PST)

Nick, I take your message to mean that it is not possible to replace
characters in matrix row names. In that case I will continue to use
the solution suggested by Stata tech support, which changes value
labels before any matrices are created.

My final goal is a tab-delimited text file that will be imported into
a word processor to create a table like the one below. This table
compares income across different groups in the same sample from a
national household survey.

Group        Median
Male           $XXX
Female         $XXX
Primary ed.    $XXX
Secondary ed.  $XXX
Higher ed.     $XXX
Urban          $XXX
Rural          $XXX
New Jersey     $XXX
New Mexico     $XXX
New York       $XXX
Total          $XXX

I save the output from several -tabstat, by()- commands in matrices,
combine them in one big matrix, save this big matrix as variables
with -svmat2-, and export the variables to a text file with
-listtex-. Creating the table this way is faster than using
-collapse- repeatedly because it does not require saving anything to
my slow hard drive until the last step.

Friedrich Huebler

--- Nick Cox <[email protected]> wrote:
> It's true that you are hitting a limitation of 
> -matrix rownames- (which -svmat2- when written 
> in 1999, and now, could do nothing about)
> -----Original Message-----
> I am looking for a way to save a matrix that was created with
> -tabstat, by()-. An important assumption is that the value labels
> the -by- variable are not known in advance. I want to save the row
> names together with the matrix values but don't know what to do
> the row names contain certain special characters like spaces or
> apostrophes.

Do you Yahoo!? 
Check out the new Yahoo! Front Page. 

*   For searches and help try:

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