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]

Re: st: Esttab format question


From   William Buchanan <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Esttab format question
Date   Tue, 25 Jun 2013 13:15:42 -0700

There might not be a way to do this in Stata, but you can look at the -siunitx- package in LaTeX to take care of this issue and add the appropriate code to the preamble or at the beginning of each table (it also will make it possible to align the text within the cells to different characters like the decimal).  

HTH,
Billy

Sent from my iPhone

On Jun 25, 2013, at 12:58, "Perez, Victoria" <[email protected]> wrote:

> Hello,
> 
> 
> 
> I am trying to output summary tables from Stata to Latex. I need the number of observations in each category and the column percent. The problem is that the counts are large numbers and I need them presented with commas. I have tried a few different formats (%#.#gc, %#.#fc) nest to the respective stat (b) or as the option f(c 1p), but I keep getting an error that these are not valid formats/options. Is there a way to get commas included in the table? 
> 
> estpost tab v1 v2 
> 
> eststo e1
> 
> estpost tab v1 v2 if v3==1
> 
> eststo e2
> 
> estpost tab v1 v2 if v3==0
> 
> eststo e3
> 
> esttab e1 e2 e3 using tabletest.tex, cells("b(fmt(f)) colpct(fmt(1))") collabels("Count" "\%") replace nonum noobs
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *
> *   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/

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