Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: foreach command


From   Fred Wolfe <fwolfe@arthritis-research.org>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: foreach command
Date   Sun, 15 Jun 2003 18:32:15 -0500

Note that you lose any sense of what the dependent variable is. Instead,
the log simply lists t-test after t-test. Is there any way we can bring
back some marker of the command Stata repeats?
I have always thought Stata ought to have an -echo- option to deal with problem. But the best you can do is:

foreach var of varlist a b c {
di"`var'"
test `var',by(catvar)
}

It is kind of a pain in the neck.

Fred Wolfe





Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761
fwolfe@arthritis-research.org


*
* 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