Kelvin Foo wrote:
I have a do file which contains many commands such as -generate-,
-regress-, -nlcom-, etc..
I would like to run this file, and keep a log of just the output and
not the commands. How can this be done?
--------------------------------------------------------------------------------
This comes up periodically, so you might want to check the archives for any
better suggestions (there might even be an FAQ by now), but I use
a simple -program- wrapper.
Joseph Coveney
. program define logem
1. version 9.2
2. capture log close
3. quietly log using log.prn, text
4. sysuse auto
5. regress price weight
6. display in smcl _newline(2)
7. nl (price = {constant} + {weight} * weight)
8. display
9. quietly log close
10. end
. logem
[output snipped--it contains no commands]
. viewsource log.prn
.
*
* 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/