[R] Random number quality

Daniel Nordlund djnordlund at verizon.net
Fri Feb 5 23:30:22 CET 2010



> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> On Behalf Of b k
> Sent: Friday, February 05, 2010 2:04 PM
> To: r-help at r-project.org
> Subject: [R] Random number quality
> 
> Hello,
> 
> I'm running R 2.10.1 on Windows Vista. I'm selecting a random sample of
> several hundred items out of a larger population of several thousand. I
> realize there is srswor() in package sampling for exactly this purpose,
> but
> as far as I can tell it uses the native PRNG which may or may not be
> random
> enough. Instead I used the random package which pulls random numbers from
> random.org, although in my extended reading  [vignette("random-intro",
> package="random")] it seem like that may have problems also.
> 
> I'm curious what the general consensus is for random number quality for
> both
> the native built-in PRNG and any alternatives including the random
> package.
> 
> Thanks,
> Ben K.
> 

Without knowing what criteria/methods you would use to decide on "random enough", I would still say the default PRNG in R is more than adequate for your described application.

Dan

Daniel Nordlund
Bothell, WA USA



More information about the R-help mailing list