On Tue, 16 Dec 2003, Silvia Perez Martin wrote:

> Hello
>
> Iīm a student from Spain. I couldnīt find something about R and I was asking
> if someone could tell me which generator of random numbers use "rnorm" and
> "runif". I think I have discovered that in runif they use the inversion
> method, but I donīt find any clue where they use the Super-duper
> algorithm or the Marsaglia one, as I have read.
>

All the random number generators work by transforming a common stream of
random  32-bit integers.  The user can choose what generator to use for
this common stream.  The default  is "Mersenne-Twister".
?RNGkind will tell you how to choose other generators.

In addition, the user can choose how rnorm() transforms this stream of
32-bit numbers to the Normal distribution.  This is also covered in
?RNGkind.  The default is inversion.

Finally, users can supply either their own generator for the stream of
32-bit numbers or for the transformation to a Normal distribution.

        -thomas

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to