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]

Antwort: st: AW: Esttab output: a matrix to a tex table


From   Johannes Geyer <JGeyer@diw.de>
To   statalist@hsphsun2.harvard.edu
Subject   Antwort: st: AW: Esttab output: a matrix to a tex table
Date   Wed, 24 Mar 2010 11:27:55 +0100

Thank you Martin! I missed that "cells" option in
 this case and tried options "main" and "aux" which did not help. 

Johannes



owner-statalist@hsphsun2.harvard.edu schrieb am 24/03/2010 11:14:01:

> 
> <> 
> 
> The "official" approach to this problem does work, however:
> 
> 
> *************
> sysuse auto
> estpost tabstat price mpg length,  /* 
> */ s(mean p25 median p75 p90 p95 p99)
> esttab . using test.tex,  /* 
> */ replace page cells("price mpg length")
> 
> !texify -p -c -b --run-viewer test.tex
> *************
> 
> 
> 
> HTH
> Martin
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Johannes 
Geyer
> Gesendet: Mittwoch, 24. März 2010 11:06
> An: statalist@hsphsun2.harvard.edu
> Betreff: st: Esttab output: a matrix to a tex table
> 
> Dear Statalisters,
> 
> I have a problem using esttab to produce a latex table. The problem is, 
I 
> want 
> to output a matrix but esttab produces a table with only two columns in 
> the 
> header, regardless of how many columns there are:
> 
> **************************
> sysuse auto
> tabstat price mpg length, s(mean p25 median p75 p90 p95 p99) save
> tabstatmat test
> esttab matrix(test) using c:\temp\test.tex, replace
> **************************
> 
> The Latex-output I get is the following table:
> 
> **************************
> \begin{tabular}{l*{1}{c}} \hline\hline
>             &          EP&            &            \\
>             &       price&         mpg&      length\\
> \hline
> mean        &    6165.257&     21.2973&    187.9324\\
> p25         &        4195&          18&         170\\
> p50         &      5006.5&          20&       192.5\\
> p75         &        6342&          25&         204\\
> p90         &       11385&          29&         218\\
> p95         &       13466&          34&         221\\
> p99         &       15906&          41&         233\\
> \hline\hline
> \end{tabular}
> **************************
> 
> Ok, versions: when I call -which- I get:
> 
> . which esttab
> c:\ado\plus\e\esttab.ado
> *! version 2.0.5  09mar2009  Ben Jann
> *! wrapper for estout
> 
> . which estout
> c:\ado\plus\e\estout.ado
> *! version 3.13  06aug2009  Ben Jann
> 
> This seems to be ok?
> 
> I appreciate any help. I did not fully understand how this can be done 
> using -estpost- so any hint in that direction would also be very 
welcome.
> 
> Thanks,
> 
> Johannes
> 
> 
> 
> 
> ----------------------
> Johannes Geyer
> Deutsches Institut für Wirtschaftsforschung (DIW Berlin)
> German Institute for Economic Research 
> Department of Public Economics
> DIW Berlin
> Mohrenstraße 58
> 10117 Berlin
> Tel: +49-30-89789-258
> 
> *
> *   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/


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