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

Re: st:supertables, please. (Tufte 1983 :179)


From   adiallo5@worldbank.org
To   statalist@hsphsun2.harvard.edu
Subject   Re: st:supertables, please. (Tufte 1983 :179)
Date   Thu, 26 May 2005 12:33:31 -0400

Hi,
I have a program - tablemat.ado-  to do that.
Kit Baum has drawn my attention to some bugs
that have been fixed now.
It is still under development to make it more elegant.

Basically, instead of doing

tabstat x, by(y1)
tabstat v, by(y2)
tabstat z, by(y3)

the program does:

tablemat x v z, by(y1 y2 y3) stat(mean)

Gindo could contact me privately to have it.

Best regards.



                                                                                                                                               
                      Friedrich Huebler                                                                                                        
                      <huebler@rocketmail.com>         To:       statalist@hsphsun2.harvard.edu                                                
                      Sent by:                         cc:                                                                                     
                      owner-statalist@hsphsun2.        Subject:  st: Re: supertables, please.  (Tufte 1983 :179)                               
                      harvard.edu                                                                                                              
                                                                                                                                               
                                                                                                                                               
                      05/26/2005 10:46 AM                                                                                                      
                      Please respond to                                                                                                        
                      statalist                                                                                                                
                                                                                                                                               
                                                                                                                                               
                                                                                                                                               




You can do this with -tabstatmat- and -mat2txt- from SSC.

. sysuse auto, clear
. tabstat mpg weight, by(foreign) nototal save
. tabstatmat mat1
. tabstat mpg weight, by(rep78) nototal save
. tabstatmat mat2
. tabstat mpg weight, save
. tabstatmat mat3
. matrix mat = mat1 \ mat2 \ mat3
. mat2txt, matrix(mat) saving(matrix.txt)

Friedrich Huebler

--- Gindo Tampubolon <gindo.tampubolon@manchester.ac.uk> wrote:
> Dear all,
>
> I wonder if there's any one can help me with producing a supertable
> (Tufte, E. The Visual Display of Quantitative Information. :179)?
> An example he produced for NYT looks like this:
> in per cent                 Carter   Reagan  Anderson
> Democrat                    xx         xx          xx
> Rep.                           xx          xx          xx
> Independent                xx          xx          xx
> ----------------------------------------------------
> Age group
>  18-21                         xx          xx          xx
> . . .                             xx          xx          xx
> ----------------------------------------------------
> Education
>   . .                            xx          xx          xx
> etc.
>
> Basically, one super column from categories of a variable
> and many rows from many variables.
> I tried
> -table  , by(superrowvarlist)- but doesn't do the trick. Or perhaps
> I'm
> wrong?
>
> Used to do it on SPSS ages ago... :(
>
> Stata 8SE on XP
>
> Many thanks for your help.
> --
> Gindo
>
> Gindo Tampubolon
> Sociology
> School of Social Sciences
> University of Manchester




__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index