Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function rpgm.geom uses rpgm.exp
in order to simulate geometric random variables faster than rgeom
.
1 | rpgm.rgeom(n, prob)
|
n |
integer, number of simulations. |
prob |
double, probability. |
The argument prob
must be in ]0, 1], else, NA are produced.
A vector of i.i.d. geometric random variables.
For a big number of simulations, it is in general ten times faster than the usual rgeom
.
Nicolas Baradel - PGM Solutions
https://en.wikipedia.org/wiki/Ziggurat_algorithm
http://pgm-solutions.com/packages
1 | rpgm.rgeom(5, 0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.