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: suppressing header information in eststo/esttab


From   Richard Herron <[email protected]>
To   [email protected]
Subject   Re: st: suppressing header information in eststo/esttab
Date   Mon, 12 Mar 2012 09:36:22 -0400

I don't think there's a way in -esttab- or -estout- to write just the
body of the table to file. (Also, list posters should add where to
obtain user-written packages; -estout- is available from SSC).

I would write the table to file with the header, then omit the table
header on import using the -VerbatimInput- command from the -fancyvrb-
package. Something like this in LaTeX:

\usepackage{fancyvrb}

    \begin{table}
        \centering
        \caption{Example.} \label{tab:example}
        \input{esttab_output_with_header.tex}
        \VerbatimInput[firstline=4, lastline=10]{esttab_output_for_middle.txt}
        \input{esttab_output_with_footer.tex}
    \end{table}

HTH.


On Sun, Mar 11, 2012 at 19:48, Isaac Sorkin <[email protected]> wrote:
> Dear Statalist:
>
> I am using eststo and esttab to create a bunch of table fragments that
> I then want to combine together.  In particular, I am computing
> statistics of the data.  I want to omit the header that says which
> statistic is being displayed (since this will show up elsewhere in a
> manual part of the table).
>
> My code is:
>
> eststo: quietly estpost tabstat CoolPeople , statistics(sum) columns(statistics)
> esttab using "file.tex" ,  fragment cells(sum(fmt(0) ))  unstack
> nonote nonumber nomtitles
>
> This generates a file like:
>
>                           &     sum&     sum&     sum& sum&     sum\\
> \hline
> CoolPeople                            &      130&      247&      474&
> 257&      196     \\
> \hline
> Observations                         &     195&     256&     914 &
> 330&     241\\
>
> I would like the file to look like:
>
> \hline
> CoolPeople                            &      130&      247&      474 &
>   257&      196     \\
> \hline
> Observations                         &     195&     256&     914& 330&     241\\
>
> Help?
>
> Thanks.
>
> Isaac
>
> *
> *   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