Statalist


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

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


From   Miranda Kim <mk@mrc.soton.ac.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: AW: st: Suppress col total in tab2, tabout?
Date   Tue, 10 Nov 2009 10:42:39 +0000

Can I ask how would you add extra rows to this table, for example if you wanted to tabulate several variables by the same column variable?

Maarten buis wrote:
--- On Tue, 10/11/09, Kaulisch, Marc wrote:
Is there an opportunity to add a second column variable?

sysuse auto, clear sum price, meanonly
gen byte expensive = price > r(mean) if price < .
label define expensive 0 "cheap" 1 "expensive"
label value expensive expensive

eststo a: estpost tabulate rep78 foreign eststo b: estpost tabulate rep78 expensive

esttab a b using "c:\temp\foo" , rtf replace ///
        cell("b colpct(fmt(2))") collabels(n %) ///
        mtitles("origin" "expensive") nonumber ///
        unstack noobs ///
        drop("Total:" "Domestic:Total" "Foreign:Total")

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

Creating a program that will make the one table you want is
easy, the problem is creating a program that will make all
tables that everybody wants. I agree with you that such a
capability would be very welcome, but I also appreciate that
StataCorp is taking its time to get it right.
-- 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