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   daniel klein <>
Subject   Re: st: Setting same seed, getting different random numbers.
Date   Thu, 1 Dec 2011 21:17:27 +0100

Fair point, Nick.

I have shown my complete code and I obviously did not use version
control. I can reproduce Gregorio's results. With verison control set
to 10.1 (up to 11.1) I can produce two identical datasets. However,
since we are concerned with differences in datasets produced in Stata
11.2 and 12, questions remain.

The changes you pointed out were introduced in Stata 11.2. So we
should expect the datasets produced by Stata 11.2 and 12 to be
identical. However, they are not. Setting version to 11.2 in Stata 12
does not make any difference.

 As I have pointed out it might have something to with

"6.  Version control for random-number generators is now determined
when the seed is set, not when the generator function is used; see [P]
version. [...]"

-help whatsnew11to12-

but I cannot figure it out completely. Maybe I am missing something.


I've not been following this thread closely, but would underline what
is said in -help whatsnew11- at 30mar2011

14.  rnormal(), the Gaussian random-number generation function in both
         Stata and Mata, now produces different, better values.  Prior results
         are reproduced under version control.

Who did and who did not use version control?
*   For searches and help try:

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