pref_sample: Sample preferentially

Description Usage Arguments

View source: R/statgentools.R

Description

Sample values from an inhomogeneous Poisson process with intensity c*f(t)^beta.

Usage

1
2
pref_sample(f, lim = c(0, 1), c = 1, beta = 1, upper = NULL,
  grid.len = 1000)

Arguments

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.


mdkarcher/phylodyn documentation built on Nov. 24, 2021, 12:20 a.m.