Do you want the -noisily- and/or the -trace- option with -simulate-?
For example:
. capture program drop myprogram
. program define myprogram, rclass
1. di in r "myprogram"
2. return scalar n = 1
3. end
.
. quietly simulate n=r(n), noisily reps(10): myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
. myprogram
myprogram
.
end of do-file
Scott
On Dec 29, 2007 12:47 PM, Jeph Herrin <[email protected]> wrote:
> I am using -simulate- to run -myprogram-, and
> would like -myprogram- to display some output
> each time, for tracking purposes. The problem
> is that -display- seems to only work the first
> time through.
>
> For example:
>
> ===============================================
> capture program drop myprogram
> program define myprogram, rclass
> di in r "myprogram"
> return scalar n = 1
> end
>
> quietly simulate n=r(n), reps(1000): myprogram
> ===============================================
>
>
> produces the following output:
>
> ===============================================
> . capture program drop myprogram
>
> . program define myprogram, rclass
> 1. di in r "myprogram"
> 2. return scalar n = 1
> 3. end
>
> .
> . quietly simulate n=r(n), reps(1000): myprogram
> myprogram
>
> .
> .
> .
> end of do-file
*
* 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/