Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: RE: tabout - how to flip a table


From   Josef Montag <josef.montag@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: tabout - how to flip a table
Date   Sun, 2 May 2010 11:54:16 -0400

thanks a lot, josef
On May 2, 2010, at 4:47 AM, Martin Weiss wrote:

> 
> <>
> 
> You may also like -ssc d estout- for this purpose:
> 
> 
> ***********
> sysuse nlsw88, clear
> 
> capture which estout
> if _rc ssc install estout
> 
> estpost tabstat wage hours, by(race) ///
> stat(mean semean) c(stat) listwise
> 
> esttab ., main(mean) aux(semean) ///
> noobs nonote label nostar unstack 
> 
> ***********
> 
> 
> HTH
> Martin
> 
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Josef Montag
> Sent: Sonntag, 2. Mai 2010 02:20
> To: statalist@hsphsun2.harvard.edu
> Subject: st: tabout - how to flip a table
> 
> Hi all,
> 
> i have a tabout line producing a table i need, except i would like to have
> it flipped so that vertical variable typesex becomes horizontal, so i can
> append other variables to the table
> 
> here is what i do:
> 
> tabout typesex    using $outdir/race.tex,  style(tab)   c(mean lnwage se
> lnwage ) replace  svy f(3 3) clab(Mean SE)  lay(col)  sum 
> 
> to get this:
> typesex		 Mean    SE
> H. men  	3.036   (0.006)
> H. women        2.700   (0.006)
> Gays    	2.984   (0.008)
> Lesbians        2.880   (0.008)
> Total   	2.883   (0.004)
> 
> but i want typesex labels to be the column headers and means in one line
> below each header. basically i want four columns by typesex and other
> variables (meens and ses) listed below.
> 
> any idea how to do this?
> 
> thanks a lot, Josef
> 
> 
> --
> Josef Montag
> Ph.D. Candidate 
> IEL - International Programme in 
> Institutions, Economics and Law,
> Carlo Alberto, Torino.
> Visiting Scholar, Cornell Law School.
> Web: sites.google.com/site/josefmontag
> Phone: +1(607)216-7950
> 
> 
> 
> 
> 
> 
> 
> 
> *
> *   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/

--
Josef Montag
Ph.D. Candidate 
IEL - International Programme in 
Institutions, Economics and Law,
Carlo Alberto, Torino.
Visiting Scholar, Cornell Law School.
Web: sites.google.com/site/josefmontag
Phone: +1(607)216-7950







*
*   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   |   Site index