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

Re: st: Query on -set seed-


From   "Michael Blasnik" <michael.blasnik@verizon.net>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Query on -set seed-
Date   Mon, 7 Feb 2005 17:23:33 -0500

Check your math, I think 2^31=2147483648


----- Original Message ----- From: "Richard Goldstein" <richgold@ix.netcom.com>
To: <statalist@hsphsun2.harvard.edu>
Sent: Monday, February 07, 2005 4:51 PM
Subject: Re: st: Query on -set seed-



I'm confused -- what is illegal about this seed? it is clearly much smaller than 2^31 -1

Rich

Roger Newson wrote:


Fellow Statalisters (especially StataCorp):

According to -[R] functions-, the -set seed- command can take any seed from 0 to 2^31-1 inclusive, and, if I specify a seed with one of these values in a do-file under -version- control and then use the -uniform()- function, then the same result will be produced every time I execute that do-file with the same input data. My query is, will this still be the case if I set the seed to an even higher integer? I ask because, last July, I inadvertently wrote a do-file containing the statements

set seed 4753533809;
gene double ranord2=uniform();
<snip>
*
* 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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index