Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: add column in -tabout- for symbols
From
"Kaulisch, Marc" <[email protected]>
To
<[email protected]>
Subject
st: add column in -tabout- for symbols
Date
Mon, 13 Jun 2011 07:22:43 +0200
Using -tabout- (from ssc) I encounter a difficulty I can not solve on my
own. Using the layout(row) option I would like to add a column for the
symbols (% and N).
The following example should illustrate my point:
sysuse auto
gen lengthc = length>200
tabout foreign lengthc using test_tabout.doc, style(tab) cells(row freq)
format(1 0) ///
clab(%
N) layout(row) ///
dpcomma
replace
I get the following table
lengthc
Car type 0 1 Total
Domestic % 55,8 44,2 100,0
N 29 23 52
Foreign % 100,0 0,0 100,0
N 22 0 22
Total % 68,9 31,1 100,0
N 51 23 74
But I would like to get the following:
lengthc
Car type 0 1 Total
Domestic % 55,8 44,2 100,0
N 29 23 52
Foreign % 100,0 0,0 100,0
N 22 0 22
Total % 68,9 31,1 100,0
N 51 23 74
Is there a way to add this column automatically in the program?
Thanks for your help.
Marc
*
* 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/