In addition to the advice of the others, I'll note
that when I want a "random" seed - to get a "random"
sequence of random numbers, I do something like:
local time=c(current_time)
local seed : subinstr local time ":" "", all
set seed `seed'
So each time the code runs, the seed is set to the
hour-minute-second combination. However, as Maarten
explained, there aren't many situations you'd want to
do this.
Jeph
[email protected] wrote:
I set seed # before the runiform() function. For instance, I typed,
set seed 100 g x=runinform()
my confusions are, 1.how to set the seed number propriately? I saw
everyone set it large.Any difference? 2. how to cancel the seed set
previously? Maybe next time I again want to produce uniformly
distributed random variates, and set seed 100 by accident , which may
lead to the variates produced is not random.
Thank you for any replies!
Sincerely, from Rose.
* * For searches and help try: *
http://www.stata.com/help.cgi?search *
http://www.stata.com/support/statalist/faq *
http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/