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

st: Re: Save -tabulate- output as matrix


From   Ilesh Patel <[email protected]>
To   [email protected]
Subject   st: Re: Save -tabulate- output as matrix
Date   Wed, 13 Oct 2004 14:04:43 -0400

To my knowledge this cannot be done.

What I do is highlight the table, then right click on the mouse and select
'Copy Table'. This pastes nicely into excel after which I make all the
cosmetic changes like getting rid of the totals.

Ilesh

----- Original Message -----
From: Friedrich Huebler <[email protected]>
To: <[email protected]>
Sent: Wednesday, October 13, 2004 1:47 PM
Subject: st: Save -tabulate- output as matrix


> 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:
>
> tab[2,2]
>           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.
> http://messenger.yahoo.com
> *
> *   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/

*
*   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/



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