Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: "random" seed for uniform()


From   David Kantor <[email protected]>
To   [email protected]
Subject   Re: st: "random" seed for uniform()
Date   Fri, 10 Oct 2003 09:27:04 -0400

Gary Longdon wrote, in response to Michael Oakes:


[...]
Then, I would argue against changing the seed at all.
[...]
I would add one more thought. If I am developing a program or do-file that uses random numbers, and I am tweaking the algorithm, then I want to see the resulting change that is due to each little change in the algorithm. I want to see only the effects of my programming changes -- not confounded by having a different sequence of random numbers. Thus, during development, I will set seed to the same value at the start of each run, to obtain the same "random" sequence each time. Once I am satisfied with the program, I may rerun it several times with different random seeds, such as those obtained from the time.

Similarly, if a procedure draws a random sample (or uses randomization combined with other methods to draw a selection) and I later want to retrace the process, but perhaps generating additional variables along the way, then I would want to use the same seed as was used before.

-- David

David Kantor
Institute for Policy Studies
Johns Hopkins University
[email protected]
410-516-5404

*
* 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