How to choose "seed" in set.seed(seed, ...)?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to choose "seed" in set.seed(seed, ...)?

Michael Hannon
Greetings.  I understand that to generate distinct sequences of random numbers
in R one can initialize the calculation of each sequence by calling the
set.seed() function with a distinct value for "seed" the (integer) first
argument to the function.

I'd like to know if there are any guidelines or best practices for
choosing "seed".

I.e., is it OK just to choose seed as any consecutive integers (1, 2, 3, ...),
or should the integers be, say, relatively prime (7, 9, 13, ...), or disjoint
sequences of digits from pi (14159, 26535, 89793, ...) or ...?

Thanks.

-- Mike

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: How to choose "seed" in set.seed(seed, ...)?

milton ruser
Hi Michael,

Experts will answer you better than me, but IMHO
there is no "best practices". In general you deal with set.seed()
when you want that others (or yourself) reproduce the
same sequence of random numbers generation as you
run on a moment.

Best regards

milton




On Wed, Feb 3, 2010 at 10:57 PM, Michael Hannon <[hidden email]> wrote:

> Greetings.  I understand that to generate distinct sequences of random
> numbers
> in R one can initialize the calculation of each sequence by calling the
> set.seed() function with a distinct value for "seed" the (integer) first
> argument to the function.
>
> I'd like to know if there are any guidelines or best practices for
> choosing "seed".
>
> I.e., is it OK just to choose seed as any consecutive integers (1, 2, 3,
> ...),
> or should the integers be, say, relatively prime (7, 9, 13, ...), or
> disjoint
> sequences of digits from pi (14159, 26535, 89793, ...) or ...?
>
> Thanks.
>
> -- Mike
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.