Description Usage Arguments Value Note Author(s) References Examples
An implementation of the adaptive-rejection sampling algorithm in Gilks, et. al. (1992). It allows one to perform adaptive-rejection sampling on a log-concave density.
1 |
FUN |
log-concave density function. Need not be normalized. |
n |
optional; number of points to sample |
D |
optional; domain of the density. If unspecified, domain will be -Inf to Inf |
Vector of length n containing samples from specified input density.
For a density with extreme domain values, it is suggested first to transform the density to get a smaller mean before feeding it into the algorithm and then to scale it back after the sample is generated. For example, to sample from normal(mean=1000, sd=1), first run ars() with standard normal and then add 1000 to all numbers in the sample.
Vaibhav Ramamoorthy, Jonathan Lee, Colin Kou, Brandon Mannion
Gilks, W. R., and P. Wild. <e2><80><9c>Adaptive Rejection Sampling for Gibbs Sampling.<e2><80><9d> Journal of the Royal Statistical Society. Series C (Applied Statistics), vol. 41, no. 2, 1992, pp. 337<e2><80><93>348. JSTOR, JSTOR, www.jstor.org/stable/2347565.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.