Bookmark and Share

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]

Antwort: st: Three way table with tabout


From   Richard Ochmann <[email protected]>
To   [email protected]
Subject   Antwort: st: Three way table with tabout
Date   Wed, 14 Apr 2010 20:16:06 +0200

this might be of interest to you:
http://www.stata.com/statalist/archive/2009-03/msg01154.html

best,
rich

[email protected] schrieb am 14.04.2010 19:29:51:

> Dear Statalisters,
> 
> Using Stata 9.2.
> 
> Is it possible to get a three way table from tabout?
> 
> I would like to have a table of health status by age groups for men
> and bellow another one for women that I can easily export to Excel,
> but I'd rather have in the first row the health status variable label,
> in the second the first value label for sex (men), in the subsequent
> rows the percentages of different health status by age groups in men,
> then the second value label for sex (women) and finally the
> percentages of health status by age groups in women.
> 
> I've tried with topf:
> 
> tabout agegroups healthstatus using luisa.xls if sex==1, replace svy
> c(row ci) per f(1 1) layout(cb) h3(nil) cisep(-) ///
> 
> npos(col)style(tab)stats(chi2) topf(top.txt) topstr(MEN)
> 
> tabout agegroups healthstatus using luisa.xls if sex==2, append svy
> c(row ci) per f(1 1) layout(cb) h3(nil) cisep(-) ///
> 
> npos(col)style(tab)stats(chi2)topf(top.txt) topstr(WOMEN)
> 
> 
> 
> but then I get the sex value labels before the health status variable
> label, which is not the natural way to show the results.
> 
> Tabout does not support -bysort sex-
> 
> Many thanks,
> 
> Angel Rodriguez-Laso
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index