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: Esttab outputs too few columns in Latex style
From
Bert Jung <[email protected]>
To
[email protected]
Subject
st: Esttab outputs too few columns in Latex style
Date
Sat, 24 Nov 2012 13:29:38 -0500
Dear Statalisters,
I want to output a matrix as a Latex table using -esttab- (ssc describe
estout; I am using the newest version 3.13 06aug2009 and Stata 12MP).
My below example has a matrix with 4 columns but -esttab- only outputs 2
Latex columns, one of which is the row label.
I can manually specify the table header using the "prehead( )" option but
wonder if I might be missing something fundamental.
A similar issue has come up earlier in the context of -tabstat- but that
was resolved using -estpost tabstat- in this thread:
http://www.stata.com/statalist/archive/2010-03/msg01588.html
In my case I cannot avoid outputting a matrix and hence need estout to
output the correct number of columns in that Latex file.
Any pointers welcome!
Thanks Bert
*** Example
mat out = ( 1, 2, 3, 4 )
esttab matrix(out) using test.tex, replace
*** Output: only two columns are listed in {l*{1}{c}} one of which is
the row label.
\begin{tabular}{l*{1}{c}} \hline\hline
& out& & & \\
& c1& c2& c3& c4\\
\hline
r1 & 1& 2& 3& 4\\
\hline\hline
\end{tabular}
*
* 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/