Description Usage Arguments Details Examples
Sample points from a distribution using an adaptive rejection sampler. Based upon: Gilks, W., & Wild, P. (1992). Adaptive Rejection Sampling for Gibbs Sampling. Journal of the Royal Statistical Society.
1 | ars(n, f, starting_points, dfunc, interval)
|
n |
the number of samples that you'd like taken from the distribution. |
f |
the function used to determine the distribution from which you'll sample |
starting_points |
the starting points used for the initialization step of the ars algorithm. |
dfunc |
the derivative of the function. |
interval |
the boundary limit of the distribution. |
Adaptive rejection sampling can be beneficial when sampling from certain distributions by reducing the number of evaluations that must occur. It reduces the evaluations by assuming log-concavity for any input function, and because it doesn't need to update for new envelope and squeeze functions every iteration. ARS is particularly useful in Gibbs Sampling, where calculations are complicated but usually log-concave.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.