[R] Mersenne-Twister RNG
Guillaume Chapron
carnivorescience at gmail.com
Sun Mar 1 14:14:42 CET 2009
Hello,
I have a question regarding the default RNG in R. The helps indicate
that :
The default is "Mersenne-Twister". From Matsumoto and Nishimura
(1998). A twisted GFSR with period 2^19937 - 1 and equidistribution in
623 consecutive dimensions (over the whole period). The ‘seed’ is a
624-dimensional set of 32-bit integers plus a current position in that
set.
Looking at the GNU scientific library, the following is written:
[Generator]
gsl_rng_mt19937
The MT19937 generator of Makoto Matsumoto and Takuji Nishimura is a
variant of the twisted generalized feedback shift-register algorithm,
and is known as the “Mersenne Twister” generator. (...) The generator
gsl_rng_mt19937 uses the second revision of the seeding procedure
published by the two authors above in 2002. The original seeding
procedures could cause spurious artifacts for some seed values. They
are still available through the alternative generators
gsl_rng_mt19937_1999 and gsl_rng_mt19937_1998.
What is the exact version of Mersenne-Twister in R? Is it the 2002
revision, or the original 1998 one?
Thank you!
Guillaume
More information about the R-help
mailing list