Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: How to print and append to file akin to -display-?


From   Misha Spisok <misha.spisok@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to print and append to file akin to -display-?
Date   Tue, 15 Jun 2010 20:10:25 -0700

Hello, Statalist,

I'd like to know how I can print and append my own "output" to a file.

For example,

sysuse auto, clear
local regressors mpg rep78 headroom trunk weight
foreach var of varlist `regressors' {
	quietly {
		regress price `var'
		}
	display in yellow "coef `var'" _column(24) _b[`var']
	display in white  "t-stat `var'" _column(24) _b[`var']/_se[`var']
}

Rather than displaying these, I want to print what follows -display-
to a file (pardon me if this is the incorrect terminology).

Thanks for your time.

Best,

Misha
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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   |   Site index