Description Usage Arguments Value
Entrypoint for 'ars' package. Runs an adaptative rejection sampling algorithm on a given probability density and returns the specified number of samples.
1 |
density |
A function closure of the density to be sampled from. Input functions must have similar behavior to dnorm, dexp, etc. |
n_samples |
The number of samples to sample from the distribution |
location |
starting point at which to initialize sampling points,
default 0. Should be chosen so that |
scale |
value at which to space initial points (default 1). Should be chosen such that mode - (2scale), mode+(2scale) is within the support of the probability density. |
samples numeric vector of samples from the specified distribution
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.