Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Setting same seed, getting different random numbers.


From   Richard Gates <rgates@stata.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Setting same seed, getting different random numbers.
Date   Fri, 02 Dec 2011 16:47:39 -0600

Patrick Roland <patrick.rolande@gmail.com> posted an example in which
-rnormal()- produces different sequences in Stata 11.2 and Stata 12.

The random normal sequences generated in Stata 12 are fine, as are those in
11.2.

The problem is that the 11.2 and 12 sequences may not match, even though
they start from the same seed.

-rnormal()- in Stata 11.2 includes a very subtle improvement.  We almost did
not add this improvement, because no random number test, simulation, or
statistical method could detect the difference.  We were already updating
-rnormal()-, so we made the change.  We failed to make this change in Stata
12.

In the next update, we will make the improvement to Stata 12.

You will be able recover the sequences that -rnormal()- currently produces
under version control.


--Rich                     David
  rgates@stata.com         ddrukker@stata.com

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


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index