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: Displaying column n/row N using tabout
From
Kassandra Melius <[email protected]>
To
[email protected]
Subject
st: Displaying column n/row N using tabout
Date
Thu, 31 Jan 2013 13:54:04 +0000
Dear all
Using tabout i would like to insert a column displaying column n/row N.
In my example the syntax
tabout ethnic discl if gensex==1 using test.txt, c(freq row) clab(n %)
stats(chi2) format(!) ptotal(none) npos(lab) per style(tab) replace
Outputs:
discl_b
Ethnicity 5 cat Not disclosed Disclosed Total
n % n %
n %
1.White (n=1,914) 72.0 3.8 1842.0 96.2 1914.0 100.0
2.Black or Black British (n=72) 13.0 18.1 59.0 81.9 72.0 100.0
3.Asian or Asian British (n=39) 8.0 20.5 31.0 79.5 39.0 100.0
4.Mixed (n=77) 4.0 5.2 73.0 94.8 77.0 100.0
5.Other (n=22) 1.0 4.5 21.0 95.5 22.0 100.0
Pearson chi2(4) = 55.1755 Pr = 0.000
However i would like instead of row N's in parentheses to have another
column for "not disclosed" displaying for instance white 72/1,914,
black or black british 13/72, asian 8/39 and so on.
Is this possible with tabout?
Thank you!
Kassie
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/