Statalist


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

Re: st: Log without extra data


From   "Austin Nichols" <austinnichols@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Log without extra data
Date   Sat, 21 Jun 2008 12:41:11 -0400

erase loop_test1.log
sysuse auto, clear
forvalues i = 1/10 {
set more off
qui regress mpg weight
cap log using loop_test1.log, append
di `i' " log - " e(r2)
cap log close
}
type loop_test1.log

but what's the purpose of this?

On Sat, Jun 21, 2008 at 12:16 PM, William Bishop <wbishopco@gmail.com> wrote:
> 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