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: How to send -table- output to LaTeX table
From
Richard Herron <[email protected]>
To
[email protected]
Subject
st: How to send -table- output to LaTeX table
Date
Sun, 6 May 2012 21:27:30 -0400
Is there a way to send -table- output to a LaTeX table? Or generate
similar output with I can typically find a solution using -estpost-
(from the -estout- package on SSC) combined with -tabstat- or
-tabulate-, but here I would like either a oneway table with
subdivisions of the sorting variable and several summary statistics
variables:
. sysuse auto, clear
(1978 Automobile Data)
. table foreign, by(rep78) c(mean headroom mean trunk)
------------------------------------------
Repair |
Record |
1978 and |
Car type | mean(headroom) mean(trunk)
----------+-------------------------------
1 |
Domestic | 1.8 8.5
Foreign |
----------+-------------------------------
2 |
Domestic | 3.4 14.625
Foreign |
----------+-------------------------------
3 |
Domestic | 3.2 15.5926
Foreign | 2.7 12.3333
----------+-------------------------------
4 |
Domestic | 3.4 16.6667
Foreign | 2.5 10.3333
----------+-------------------------------
5 |
Domestic | 2.3 9.5
Foreign | 2.6 11.8889
------------------------------------------
Or a twoway table with several summary statistics (I guess for this
case I could do two -tabulate, summarize()- tables):
. table foreign rep78, c(mean headroom mean trunk)
-------------------------------------------------------
| Repair Record 1978
Car type | 1 2 3 4 5
----------+--------------------------------------------
Domestic | 1.8 3.4 3.2 3.4 2.3
| 8.5 14.625 15.5926 16.6667 9.5
|
Foreign | 2.7 2.5 2.6
| 12.3333 10.3333 11.8889
-------------------------------------------------------
I can't figure out how to generate these in -tabulate- or -tabstat-.
Should I manually generate these tables in LaTeX?
Thanks!
Richard Herron
*
* 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/