Summary
Generally, in science, every result should be reproducible, especially in quantitative analysis. This is possible by setting the seed of a deterministic pseudo random number generator. Secondly, and also very crucial, is to have a well-working random number generator to simulate random numbers from a uniform distribution. R's default random number generator, the Mersenne-Twister register-based algorithm, works pretty well. Simulated random numbers should possibly not be auto-correlated, and they should have a very long period. Otherwise, results might be biased and not trustable.
Based on uniform random numbers, random numbers from other distributions can be simulated. The important methods are the inversion method and rejection sampling. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access