Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Suppress col total in tab2, tabout?


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Suppress col total in tab2, tabout?
Date   Mon, 9 Nov 2009 09:59:31 +0000 (GMT)

--- On Thu, 5/11/09, Kaulisch, Marc wrote:
> I would like to know if there are any opportunities to
> suppress the col totals in a two-way tab?
> 
> I would like to have a table such as:
> 
> rowvar    colvar
>         1    2    3
>         n %  n %    n %
> 1
> 2
> 3
> Total
<snip>
> At best I would love to see the nototal-function of
> -tab2way- in -tabout- in order to design a table as best as
> possible before exporting to a Word processor.

Is the example below getting close to what you are looking for?
To run it you'll need to install Ben Jann's -estout- package 
by typing in Stata -ssc install estout-

*---------------- begin example --------------------------
sysuse auto, clear
estpost tabulate rep78 foreign
esttab using "c:\temp\foo" , rtf ///
        cell(colpct(fmt(2))) unstack noobs ///
        nomtitle nonumber ///
        drop("Total:" "Domestic:Total" "Foreign:Total")  ///
*------------------ end example -----------------------------        

This example is an addaption of the examples you can find here:
http://repec.org/bocode/e/estout/estpost.html#estpost110

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------



      

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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