Sample values from an inhomogeneous Poisson process with intensity c*f(t)^beta.
1 2 | pref_sample(f, lim = c(0, 1), c = 1, beta = 1, upper = NULL,
grid.len = 1000)
|
f |
function to be sampled from preferentially. |
lim |
lower and upper sampling bounds. Defaults to c(0,1). |
c |
numeric constant of proportionality for intensity. Defaults to 1. |
beta |
numeric power to which f is raised for intensity. Defaults to 1. |
upper |
numeric upper bound for function between limits defined by lim. Used in thinning algorithm. |
grid.len |
integer if upper is undefined, automatically evaluates f at grid.len points between min(lim) and max(lim) to find upper bound. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.