Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function rpgm.rexp uses the Ziggurat algorithm with a 256-regions table, in order to simulate exponential random variables faster than rexp
.
1 | rpgm.rexp(n, lambda = 1)
|
n |
integer, number of simulations. |
lambda |
double, the parameter lambda. |
The density is lambda * exp(-lambda*x) for x > 0.
A vector of i.i.d. exponential random variables.
For a big number of simulations, it is in general three times faster than the usual rexp
. For one simulution, it is around one half faster.
Nicolas Baradel - PGM Solutions
https://en.wikipedia.org/wiki/Ziggurat_algorithm
http://pgm-solutions.com/packages
1 | rpgm.rnorm(5)
|
[1] -0.2839522 -0.7784362 1.4719206 -0.3494252 0.3282544
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.