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

st: Save -tabulate- output as matrix

From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   st: Save -tabulate- output as matrix
Date   Wed, 13 Oct 2004 10:47:33 -0700 (PDT)

I am looking for a way to save -tabulate- output as a matrix, with
row names and preferably without the "Total" row. This would be
similar to the way -tabstatmat- converts -tabstat- output to a
matrix. With the matcell, matcol and matrow options some of the
-tabulate- results can be saved but I don't know how to save the
value labels and the percent values. The following example makes
clear what exactly I would like to do.

. sysuse auto
. tab foreign

Car type |      Freq.     Percent        Cum.
Domestic |         52       70.27       70.27
 Foreign |         22       29.73      100.00
   Total |         74      100.00

I would like to create a matrix that looks like this:

          freq  percent
Domestic    52    70.27
 Foreign    22    29.73

This appears to be a simple problem but I could not find a solution
in the manuals, with -findit- or in the Statalist archives.

Friedrich Huebler

Do you Yahoo!?
Y! Messenger - Communicate in real time. Download now.
*   For searches and help try:

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