Statalist


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

st: Log without extra data


From   "William Bishop" <wbishopco@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Log without extra data
Date   Sat, 21 Jun 2008 09:16:36 -0700

Running this:
----------
sysuse auto, clear

forvalues i = 1/10 {
set more off

regress mpg weight

log using loop_test1.log, append
di `i' " log - " e(r2)
log close

}
----------

I get this:

---------
       log:  C:\data\loop_test1.log
  log type:  text
 opened on:  21 Jun 2008, 09:10:19
1 log - .65153125
       log:  C:\data\loop_test1.log
  log type:  text
 closed on:  21 Jun 2008, 09:10:19
--------

What I want is only the line that says:
"1 log - .65153125"

I'm sure this very simple but I haven't spotted how to turn-off the
rest of the data.
*
*   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