I don't think you need to do that.
If what you want is to record the value of c(seed) that -simulate-
starts with, then you only need record what is c(seed) just before you
run -simulate-. So
local seed `c(seed)'
and/or
di `c(seed)'
will do that.
Nick
Rachel
Here's a simpler question: How can I have simulate *return* just the
initial value of c(seed)? Nick suggested the following code, which
takes c(seed) as an argument, but doesn't return it. Thanks in
advance for your help.
capture program drop TrialProgram
program define TrialProgram
clear
set obs 9000
capture drop x y
drawnorm x y
regress y x
end
*
* 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/