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]

st: table formatting in stata


From   Haluk Vahaboglu <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: table formatting in stata
Date   Thu, 6 Jun 2013 09:11:06 +0000

TD P { margin-bottom: 0in; }P { margin-bottom: 0.08in; }


Hello Everybody,
In our research papers we
mostly present continuous data in a table with comparison to cases vs
controls as “n mean SD and p (from Ttest)”. Here is a brief
example of such a table:



................Cases	/  Controls	
	........N mean (SD)	N mean (SD)...p
Var1			
Var2			



With STATA I use these
commands



1. “estpost tabstat age
VAR1 VAR2, by(C/C) s(n mean sd) c(s)”
2. “esttab ., main(mean)
aux(sd) unstack noobs nonote  wide compress label”
3. “estpost ttest age
VAR1 VAR2, by(C/C) une w”
4. “esttab ., cell("p
(fmt(3))")”



and get two separate
tables “n mean SD” in one and “p” in the other. I afterwards
combine these two in one table formatted as mentioned above.



Is there any simple way to
get a table with n-mean-SD-p all in one line for multiple continuous
variables?
Thanks again
note: sorry for the subject line of my previous message 		 	   		  

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index