Statalist


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

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


From   "Kaulisch, Marc" <kaulisch@forschungsinfo.de>
To   <statalist@hsphsun2.harvard.edu>
Subject   AW: st: Suppress col total in tab2, tabout?
Date   Tue, 10 Nov 2009 09:45:53 +0100

Dear Maarten,

Thanks for your help. Your example was not exactly the table I had in my mind, but I guess this is the exsample I looked for.

sysuse auto, clear 
estpost tabulate rep78 foreign
esttab using "c:\temp\foo" , rtf replace ///
        cell("b colpct(fmt(2))") collabels(n %) ///
        unstack noobs ///
        nomtitle nonumber ///
        drop("Total:" "Domestic:Total" "Foreign:Total")


Is there an opportunity to add a second column variable?

I still guess it would be simpler and more intuitive to add functiontionality in the tabulate functions...

Marc


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Maarten buis
Gesendet: Montag, 9. November 2009 11:00
An: statalist@hsphsun2.harvard.edu
Betreff: Re: st: Suppress col total in tab2, tabout?

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

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