Statalist


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

Re: st: log only results of r-class commands


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: log only results of r-class commands
Date   Thu, 22 May 2008 22:07:46 +0100 (BST)

It looks to me that you have a long list of routine task, for instance
data preperation, which you do not want in your log, followed by some
describtives which you do want in your log. In such large projects it
helps to split the do-file up in several parts, for instance: 
read in the data is done using a do-file readdata.do, cleaning the data
in clean.do, prepping the data in dataprep.do, summarizing the data in
analysis.do. Then you make a master do-file, which reads:

do readdata.do
do clean.do
do dataprep.do
do analysis.do

I you only log witin the analysis.do file, you should get closer to
what you want. Anyhow, splitting the files up like this will make them
much easier to maintain, while makeing a master do-file, makes them as
easy to run as putting all the commands in one do-file.

Hope this helps,
Maarten


--- "Dr. Stephen Rothenberg" <srothenberg@mda.cinvestav.mx> wrote:

> I am setting up do-files in anticipation of running repetitive
> descriptive 
> statistics for a long-term project.  I will need to produce
> appendices that 
> contain these descriptive statistics, each of which will be scores of
> pages 
> long.
> 
> My problem is logging the output of commands like -sum- or -fsum- so
> I can 
> print the appendix stats.  I'd like to produce output that contains
> only the 
> results of the commands in legible tables and my preceding comments
> that 
> identify them, without the tedious chore of editing out the commands 
> themselves. The commands run to nearly 400 lines in scattered places 
> throughout the log, despite using -bysort- to combine analyses.
> 
> Stata includes such commands as -quietly- and the various -set
> output- 
> variations, all of which suppress results output.  The user-supplied 
> commands in the -estout- family and others do a great job in
> producing 
> tables of estimation output.  They do not work with descriptive
> commands, 
> which are r-class commands.  Stata allows me to open two logs 
> simultaneously, one showing commands, comments, results, and error
> messages, 
> the other showing only the commands, but not only results and
> comments.
> 
> I've searched the FAQs, the ssc contributions, and Statalist, without
> 
> success.
> 
> Does anyone know:
> 1. A way to log only results of r-class commands in presentable
> tables?
> 2. If not, can someone provide a method that will do this?
> 3. If nothing now exists, will StataCorp consider making output only
> logging 
> possible in future releases?
> 
> Steve Rothenberg
> CINVESTAV-Merida
> Yucatan, Mexico 
> 
> *
> *   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/
> 


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
*   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