[R] random number generator?

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Wed Jan 29 15:45:03 CET 2003


"Liaw, Andy" <andy_liaw at merck.com> writes:


> .... As Prof. Dalgaard said (privately) ....

Whoops. That wasn't really intended as a private response. Must have
mixed up 'F' and 'R' again... Here it goes again:

----
> Might I suggest taking a poll (even though unscientific) of how many people
> will be affected by a change in default RNG?  My totally arbitrary guess is
> very few, if any.
> 
> If I'm not mistaken, Python had only recently changed the default RNG to
> Mersenne-Twister.  If Python can do it, I should think R can, too, without
> too much pain...

Well, Python is not a statistical system... However, I'm inclined to
agree. However, we'd want to get it right this time, and can we be
sure that the other generators are really better?

As long as the old behaviour can be reinstated, I see very few
applications that could get in serious trouble. Those who have sample
output in their books will have greater interest in keeping the
printed output in sync with their script output than in having perfect
distributions, but RNGkind() and set.seed() should take care of that
-- at least until they have to switch compiler or CPU (which BTW would
seem to be a point in favour of the inversion method over the
other normal generators where differences in rounding can change the
*number* of calls to the uniform generator, causing random sequences
to diverge. The uniform generators generally work in integer
arithmetic, so they are more generally reproducible.)

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list