Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: how to get tables into publishable format


From   Roger Newson <[email protected]>
To   [email protected]
Subject   Re: st: how to get tables into publishable format
Date   Sun, 02 Feb 2003 17:24:20 +0000

At 17:43 31/01/03 -0500, Christopher W. Ryan wrote:
Relatively new to Stata. running version 8 (sometimes 7) on Win 98.

What is a good way to get tables from the results window, or a log file, into
another piece of software used for writing research papers (eg OpenOffice, MS
Word, Excel, etc.)? Journal editors often (usually) want their tables in some
particular format. I want to copy-and-paste, not type the table over again.
And I want the table formatted nicely, with vertical lines delineating columns;
borders, headings, etc.
Thanks.
If you can convert your tables of results into a Stata data set with 1 observation per table row, then you can use -listtex- (downloadable from SSC by typing -ssc install listtex-). The -listtex- package outputs, either to the Stata log or to a text file, the rows of a Stata data set, with a user-specified delimiter string, which defaults to the ampersand (&). You can then cut and paste the output from the Stata log or file to a Microsoft Word document, select it inside Word, and use the menu sequence

Table->Convert->Text to table

(selecting the option "Separate text at delimiter &") to convert the data to the rows of a Word table. You can then format the table inside Word, adding header rows, borders etc. The -listtex- package can be used, alternatively, to convert the rows of a Stata data set to the rows of a HTML table, a plain TeX table, or a LaTeX table.

Of course, to do this, you must first convert your output statistics into a Stata data set. Stata has many commands to do this, and different ones are appropriate for different kinds of statistics. These commands include -collapse- and -statsby- (in official Stata), and, for regression output, the -parmest- package, downloadable from SSC, which creates a stata set with one observation per parameter of a regression model and data on the estimates, confidence limits, P-values and other parameter attributes..

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index