Skip to content

Random number generator used in 'runif'

4 messages · Mauricio Zambrano-Bigiarini, S Ellison, Daniel Nordlund

#
Dear list,

For the implementation of a particular optimization algorithm it is
very important the random number generator.

I would like to know if somebody could tell me what is the random
number generator used by default in the 'runif' function.
default algorithm is 'Mersenne-Twister', but I would be really
grateful if somebody with experience in random number generators could
confirm that or tell me what is the method actually used.

Thanks in advance,

Mauricio Zambrano-Bigiarini
#
On the same help page, it says "'RNGkind' is a more friendly interface to query or set the kind of
     RNG in use." 

Try 
RNGkind()

to see the currently selected RNG. The same function with kind= specified will also change to another

S Ellison
*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}
#
No guessing necessary, as the R-help is quite explicit


Details

The currently available RNG kinds are given below. kind is partially matched to this list. The default is "Mersenne-Twister".



Hope this is helpful,

Dan

Daniel Nordlund
Bothell, WA USA
#
2013/2/18 Daniel Nordlund <djnordlund at frontier.com>:
Thank you very much for all the replies.

I was asking because I did not see any 'rng.kind' argument within the
'runif' function, and I wanted to be sure that what is mentioned in
the help page of '.Random.seed' is valid for 'runif' and all the
related functions.

Thanks again,

Mauricio