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

st: display commands generated within foreach-loop

From   Thorsten Faas <>
Subject   st: display commands generated within foreach-loop
Date   Tue, 20 Nov 2007 09:06:04 +0100

Dear all,

I'm sure my problem has a real simple solution, but I am unable to find it - how can I actually *see* the commands generated by a foreach-loop.

Let's say I have the following:

sysuse auto, clear
foreach x in "mpg" "price" {
ttest `x', by(foreign)

In this case, I would like to see

ttest mpg, by(foreign)

... output ...

ttest price, by(foreign)

... output ...

in my logfile, but I don't. All I see is the output of the T-test.

Any suggestions highly appreciated!


* For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index