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 07:21:30 -0600

Patrick wrote:
>
> I encountered a strange problem. I tried running the same code on two
> different versions of Stata - one Stata/SE 12.0 on a server, and one
> Stata/SE 11.2 on my own computer. Both generate normal random numbers
> in mata with the same seed. But after a while the random numbers they
> generate differ! The code is as follows
>
> set seed 2
> mata
> f = rnormal(1000000,1,0,1)
>
> On the two machines, f[1,1] = .7005116833. But one one f[1000000,1] =
> -.5182349644, and on the other it is .7083750352.
>
> This strikes me as bizarre and impedes replication of my code across
> computers. Any ideas as to what's going on here?
>

We have been able to reproduce this issue.  We are looking into the cause, and
we will report back to statalist when we have more information.

Richard Gates
rgates@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