Description Usage Arguments Value Examples
Sample from a log-concave density function,potentially unnormalized, using the Adaptive Rejection Sampling method described in Gilks et al (1992)
1 | ars(g, a, b, N, n_per_step = 500)
|
g |
input density function |
a |
lower bound of function domain D (could be -Inf) |
b |
upper bound of function domain D (could be Inf) |
N |
number of observations required |
n_per_step |
Default = 500. Number of observations between each update of the hull function |
A one-dimensional vector of N independent observations from the the given input density
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.