As it happens, unofficial Stata has a very large number of utilities to
produce tables for LaTeX and/or HTML and/or word processor and/or
spreadsheet documents. Two ways to start a search on that subject from
within Stata are to type
findit listtex
which leads you to a lot of material on my -listtex- package, and to
type
findit estout
which leads you to a lot of material on Ben Jann's packages such as
-estout-. Either of these can be used to produce LaTeX tables using
Stata do-files.
I hope this helps.
Roger
Roger Newson
Lecturer in Medical Statistics
POSTAL ADDRESS:
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute at Imperial College London
St Mary's Campus
Norfolk Place
London W2 1PG
STREET ADDRESS:
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute at Imperial College London
47 Praed Street
Paddington
London W1 1NR
TELEPHONE: (+44) 020 7594 0939
FAX: (+44) 020 7594 0942
EMAIL: [email protected]
WEBSITE: http://www.kcl-phs.org.uk/rogernewson/
Opinions expressed are those of the author, not of the institution.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Winfield
Scott Burhans
Sent: 15 February 2006 21:04
To: [email protected]
Subject: Re: st: Re: Learning LaTex
Friedrich,
Thanks. I agree with you and Robert Duval that the Stata graphics are
superior. However, I used Excel when I originally built the report
(which
is repeatedly run each month using data extracted from a separate Acess
database that is independent of my report work). I needed Excel because
when I built the reports (several years ago now)I could get a Word
document to refresh the tables, but I was not able to get it to update
the
graphics to a revised graphic saved with the same name (which I had
created in Stata). I may have missed something on how to get that done,
or perhaps either Word or Stata may have imposed some limitation at that
time, but nonetheless was unable to get the Stata graphics to refresh
when
I placed them in a Word document. (The data changes ~ 30 - 60 times per
month, the report is regenerated each time; thus I needed a report that
would be easy to regenerate each time the data was updated).
In any case, this was created several years ago (perhaps 3 or 4, can't
remember exactly when I set it up), and somewhere in the past Michael
Blasnick did send me a copy of his routine for using the mail-merge
approach; by the time I got that I had my report set up and running
however, and I filed his protocol away for use another time. He had
mentioned it on Statalist one time, and was kind enough to send me a
description of his technique.
My routine has worked reasonably well, but I expect to be revising the
reports sometime soon, and would like to move to LaTex or similar to
help
me produce a better, more labor efficient (assuming my own LaTex
learning
curve is not applied to it) set of reports. Thus, if I can find the
time,
I would like to develop the ability to use LaTex.
I missed Michaels talk at NAUSG last year; his routine, as I remember
it,
was quite useful, and a creative way to address the problem.
On a related matter, I wonder if it might ever be possible to create
tables as graphics in Stata? That is, do all the formatting in Stata,
and
then handle the completed table much as we handle a Stata graphic
now...using it elsewhere essentially as a completed picture.
Thanks very much for the ideas.
Buzz
> Buzz,
>
> Why do you need Excel when you can make tables and graphs with Stata?
> Michael Blasnik describes how to use Stata and MS Word to generate
> the kind of report you seem to work on. For your information I
> include the abstract of his presentation at last year's Stata Users
> Group meeting in Boston.
>
> Friedrich Huebler
>
>
> Mass producing appendices using Stata and word processor mail merge
> http://www.stata.com/meeting/4nasug/mblasniknasug.ppt
> http://www.stata.com/meeting/4nasug/abstracts.html
>
> Abstract: Confronted with the task of producing a large appendix to a
> report that involved a page of tables and 3 graphs for each of 186
> panels, the author discovered an approach to automate this process
> using Stata combined with the mail-merge facilities of a word
> processor. A Stata do-file produces all 558 graphs and writes an
> ASCII file of data that also includes the graph file names for each
> panel. A one-page mail-merge document is set up in the word
> processor, and the Stata output is used as the data source to
> automatically create the entire 186-page appendix with all tables and
> graphs placed as desired. This session will outline how to employ
> this approach for such otherwise daunting tasks.
>
>
> --- Winfield Scott Burhans <[email protected]> wrote:
>> Roger, my hope is to use LaTex for a report set that is currently
>> generated from a series of Stata *.do files which create *.csv
>> files which
>> are then used as external data sources that automatically refresh
>> multiple
>> data ranges in Excel, which then are used in both tables and
>> graphics
>> generated from that data. The Excel file is printed and then
>> refreshed
>> with a new run of Stata. Currently this involves invoking Stata,
>> then the
>> Excel file, and then manually refreshing the Excel file after each
>> run
>> through the Stata *.do files. What drove me to Excel originally
>> was that
>> I needed the graphics in the report I printed, and I couldn't
>> figure out
>> an easy way to refresh the graphics in the report (this was created
>> several years ago). I assume I can do this in LaTex.
>
>
*
* 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/