[R] runif (and other generator) "precision" / man pages

Ben Bolker bolker at ufl.edu
Sat Jan 3 18:42:11 CET 2009


John C Nash <nashjc <at> uottawa.ca> writes:

> 
> I'm inclined to agree with the view that the "precision" of a generator 
> should be highlighted better in the manual pages. When I do
> 
> ?runif
> 
> I don't see a mention, but ?.Random.seed DOES give the info, as Duncan 
> points out, and it is suggested to look there.
> 
> A 1-liner with each random number generator
> 
> "CAUTION: random number generators use different mechanisms and provide 
> different properties of output that may not match your expectations, 
> e.g., precision and periodicity. Do read details (... reference here ... 
> ) if they may be important to you."
> 
> could be helpful to folk who are not familiar with the subject.

 [snip]

  I would suggest that this would be most (only?) useful
under runif().  I'm not sure how much people are using other
random distributions as the basis for generating derived
quantities/deviates that depend on the detailed properties
of the deviates ... and I might suggest

The characteristics of output from pseudo-random
number generators (such as precision and periodicity) vary widely.  See
?.Random.seed for more information

  as a slightly shorter version.

  Ben Bolker




More information about the R-help mailing list