Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: dynamic report generation


From   Phil Schumm <pschumm@uchicago.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: dynamic report generation
Date   Mon, 30 Oct 2006 05:15:41 -0600

On Oct 27, 2006, at 12:55 PM, Jason Thompson wrote:
is anyone using Stata for automatic document generation, ala Sweave with R/S? i have discovered a presentation on reproducible research here, http://repec.org/nasug2005/Schumm_NASUG-presentation.pdf, but the command -stata2doc- does not seem to be available online. i have an email in to the primary author but thought i'd also ask around.

I am very sorry to say that since that presentation, little has been done on the project, and our efforts to secure funding for further development have so far been unsuccessful. It is our intention to return to it at some point, but at the moment it is difficult to predict when that will happen.

At the time I gave that presentation we had made good progress on the code itself, but no documentation had been written (and that hasn't changed). Moreover, no attempt had been made to package the system to make it easy to use; using it required an under-the-hood knowledge of both Python and docutils (in addition to Stata, of course). I made no attempt to distribute it because at the time I knew I couldn't handle the inevitable support questions, and I didn't want to leave users (understandably) frustrated.

At the moment, the state of the art for automatic report generation is probably to use both -estout- and -graph- to write tables and figures to individual output files, and then to include these in the main document (e.g., using \include{} in LaTeX). Alternatively, if you require more complex tables, you can write the table in LaTeX with empty cells, and then use Stata code to fill in the numbers. I have used this approach for tasks such as generating quarterly data monitoring reports for a clinical trial. Although it generates very nice results, it takes some practice in order to do it quickly.

Of course, neither of these approaches matches the level of integration of Sweave, nor, for example, are capable of placing individual results directly into the text. I am pleased, however, to hear that there are others who are interested in this, and will notify you if (and when) we have something ready to distribute.


-- Phil

*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index