Statalist


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

Re: st: suppressing column totals in tabout


From   Roy Wada <[email protected]>
To   [email protected]
Subject   Re: st: suppressing column totals in tabout
Date   Fri, 13 Nov 2009 07:42:52 -0800

> Is there a way to display row totals but not column totals in tabout?
> I only know of the ptotal(none) command which removes both row and column
> totals.

This depends on what you want. If you are only asking for text output,
then you can -insheet- the table produced by -tabout-, drop the column
total, and -outsheet- the output. You can even use the likes of
-listtex- or -dataout- to dump it into tex format but it won't be the
same.

If you want a more comprehensive solution, you should write Ian Watson
and ask nicely if he would consider including this feature in the
future version of -tabout- because there seems to be a demand for
this. Dropping something is easier than including it, so this seems
doable.

If you are asking for a way to micromanage it today, with and without
total, then there are other solutions but it would be hard to match
tabout's capabilities.

* without total
outreg2 died drug using myfile, title("Drug type (1=placebo)") /*
*/ cross replace stats(coef) tex

* with total
outreg2 died drug using myfile, /*
*/ title("Drug type (1=placebo)") cross stats(coef) ct("`lev'") tex replace
outreg2 died if drug~=. using myfile, /*
*/ title("Drug type (1=placebo)") cross stats(coef) ct("Total") tex

* with percent
outreg2 died drug using myfile, title("Drug type (1=placebo)") /*
*/ cross replace  tex
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index