Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to produce automated reports with Stata?

    Hello,

    I'm familiar with many of the estout commands that are useful for producing publication quality or near publication quality tables. That's great. What I'm looking for now is a nice and easy way to produce automated reports and updates to reports. Ideally, in addition to updated tabular and graphical data, I'd also like to be able to update sections of text in the same document. The text would just be bullet points highlighting the tabular and graphical data, so I'm thinking there's got to be a way to link it with either.

    Is there a way to do this? The Stata Automated Report, which uses Word as a foundation while calling up Stata, seems overly complicated. Does Stata have capabilities of making use of Microsoft Access or Microsoft Excel that might make mass production of reports a flash? A simple example would be great. An intermediate example that shows an update that overwrites the simple example would be even better.

    Thanks,
    DDT

  • #2
    I fear that I have misunderstood your question, but here goes.

    According to legend, Euclid was approached by some royal person asking for a quicker course in geometry than was on offer and was told there were no short cuts: There is no royal road to geometry.

    Similarly, there are now many papers explaining routes to report generation using Stata, but none of them can offer "a flash". How could it be otherwise? Unless someone has written a program that automates exactly the form you want followed, the recipe can only be that you must specify a complete and detailed template for a report to follow, some way or another.

    I don't see how which other software you are or might be using can affect this.

    The only failsafe recipe is as follows. Write your report once using Stata and some data and automate everything using a do-file and whatever else you use, and then slowly but surely generalise that. The bullet to bite to get any strong generalisation is that you will find yourself programming. It's a safe bet that most programs on offer grew that way, directly or indirectly.

    Comment


    • #3
      Touché, Nick. When I suggested something that could be done in a flash, I meant from an intermediate user's adeptness at using Stata. I'm not opposed to spending a couple hours typing code; my main aim is to use as few software programs as possible and to still end up with a product that is high quality. I suspect an expert Stata user, in addition to exporting tables and graphs into excel or word, might also be able to generate a few statements that summarize a table or graphs contents and include them below the table or graph. The challenge in my mind is making the code for such text somehow connect to tabular or graphical values.

      I don't have a clue what the code would look like. Something like the -addnotes- option under esttab that instead produces a bulleted list for which some fields could be updated would be nice. Just as a generic example, following is a simple crosstab. Beneath it are some summary statements about the data. Only a few fields within the summary statements would need updating (i.e., the word in all caps and any numerical values).

      Race Gifted/Talented Not Gifted Talented Total

      W 262 932 1194
      B 283 1345 1628
      H 410 1790 2200
      A 101 400 501
      O 83 299 382

      Total 1139 4766 5905


      Relative to all other races/ethnicities, a GREATER proportion of white students was assigned to gifted and/or talented status than not.

      Overall, whites constituted about 23% of the total number of gifted and/or talented students.

      Blacks were about 25% of those classified as gifted and/or talented.

      About 19% of all students were classified as gifted and/or talented.


      Seems simple, but perhaps it's more complicated than I thought.

      Comment


      • #4
        You can try Roger Newson's rtfutil from SSC.
        Code:
        ssc d rtfutil
        The author describes the package as follows:

        The rtfutil package is a suite of file handling utilities for producing Rich Text Format (RTF) files in Stata, possibly containing plots and tables. These RTF files can then be opened by Microsoft Word, and possibly by alternative free word processors. The plots can be included by inserting, as linked objects, graphics files that might be produced by the graph export command in Stata. The tables can be included by using the listtex command, downloadable from SSC, with the handle() option.

        Comment


        • #5
          Maybe a little out of place here (and maybe better placed in the wishlist Stata XX thread) but if David Torres is still undecided which program to use and is willing to get into R, it happens that the knitr-package writen by Yihui Xie (http://yihui.name/knitr/) might be the thing to try out. I just got introduced to it by a collegue of mine today, because we had a very short workshop on "reproducible research". Impressive work!

          Such so called dynamic documents would be nice for future Stata versions in my opinion.

          Comment

          Working...
          X