This is the sense in which I meant to include time. I did
not mean in the sense of any system time, but of how many
calls you have made to the generator since -set seed-.
By far the easiest way to ensure reproducibility
is to -set seed- immediately before calling up the
generator.
Poor wording on my part, evidently. Sorry about that.
Nick
[email protected]
Sergiy Radyakin
> Setting seed is enough:
>
> . set seed 1
>
> . di uniform()
> .66818523
>
> . di uniform()
> .92796107
>
> . di uniform()
> .48448141
>
> . set seed 1
>
> . di uniform()
> .66818523
>
> However, if you initially set seed to be equal to current
> time (rather then
> the constant 1 here) than time matters.
SamL
> > Just a clarification requested. Nick Cox just seemed to
> indicate that to
> > replicate using seed one needs to also reference time. Have I
> > misunderstood? Or is time an alternative way to obtain a
> seed when one
> > does not care what it is? I guess I just want to assure
> that setting seed
> > *sets* the seed so that it replicates any other run with
> the same seed,
> > regardless of the time.
*
* 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/