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

Re: st: two-way table: how to supress total?

From   Eric Booth <>
Subject   Re: st: two-way table: how to supress total?
Date   Fri, 13 Nov 2009 09:40:45 -0600

I wish that the ptotal() option of -tabout- included a way to suppress panel column totals as well. Using -esttab- (as Martin suggested) is cleaner option, but you can still get the output you are asking for with -tabout-.

To do so, you need to split out your 'by' variable (drug) and switch the table to 'summary' format.
Here's an example:


sysuse cancer, clear
tabout died drug using "table1.txt", replace ptotal(none)

tab drug, gen(f)
recode f* (0=.)

tabout died using "table1.txt", append sum c(N f1 N f2 N f3) ptotal (none)



Eric A. Booth
Public Policy Research Institute
Texas A&M University
Office: +979.845.6754

On Nov 13, 2009, at 2:03 AM, Maarten buis wrote:

--- On Fri, 13/11/09, Yun Liu wrote:
When generating two-way tables, I couldn't find a way to
supress the total reported at the end of each row.
I usualy use the "tabout" command to generate tables.

Hope this helps,

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

*   For searches and help try:

*   For searches and help try:

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