Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

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

From   Richard Gates <>
Subject   Re: st: Setting same seed, getting different random numbers.
Date   Fri, 02 Dec 2011 16:47:39 -0600

Patrick Roland <> 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

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

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

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index