sim_nhpp: Simulate non-homogeneous Poisson process on the real line

View source: R/sim_nhpp.R

sim_nhppR Documentation

Simulate non-homogeneous Poisson process on the real line

Description

Simulate non-homogeneous Poisson process on the real line

Usage

sim_nhpp(lambda, min, max, M = NULL)

Arguments

lambda

non-negative intensity function. The first argument is the coordinate on the real line.

min

lower limit of the observation interval

max

upper limit of the observation interval

M

an upper bound for the function lambda. If M = NULL, an upper bound is obtained using optimize.

Value

a vector containing the points of the realization

Examples

# Using known bound M over interval [0,10]
lambda <- function(x) abs(sin(x))
y <- sim_nhpp(lambda = lambda, min = 0, max = 10, M = 1)
# Using unknown bound M over interval [0,10]
y <- sim_nhpp(lambda = lambda, min = 0, max = 10, M = NULL)

PeteyCoco/ppdeconv documentation built on March 21, 2022, 5:35 a.m.