Statalist The Stata Listserver


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

st: Re: Seed and time


From   "Sergiy Radyakin" <[email protected]>
To   <[email protected]>
Subject   st: Re: Seed and time
Date   Mon, 26 Feb 2007 20:09:40 +0100

Hi, Sam!


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.

Regards, Sergiy





----- Original Message ----- From: "SamL" <[email protected]>
To: "Stata Listserve" <[email protected]>
Cc: <[email protected]>
Sent: Monday, February 26, 2007 8:02 PM
Subject: st: Seed and time



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.

Thanks a bunch.
Sam

*
* 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/
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index