draw_intensity {nhppp}R Documentation

Simulate from a non homogeneous Poisson Point Process (NHPPP) from (t0, t_max) (thinning method)

Description

Sample NHPPP times using the thinning method, optionally using an rstream generator

Usage

draw_intensity(
  lambda,
  lambda_maj = NULL,
  exp_maj = FALSE,
  range_t = c(0, 10),
  rng_stream = NULL,
  atmost1 = FALSE
)

Arguments

lambda

(function) the instantaneous rate of the NHPPP. A continuous function of time.

lambda_maj

(double, vector) the intercept and optional slope of the majorizing linear (if exp_maj = FALSE) or log-linear (if exp_maj = TRUE) function in range_t.

exp_maj

(boolean) if TRUE the majorizer is exp(alpha + beta * t)

range_t

(vector, double) min and max of the time interval.

rng_stream

(rstream) an rstream object or NULL

atmost1

boolean, draw at most 1 event time

Value

a vector of event times (t_); if no events realize, a vector of length 0

Examples

x <- draw_intensity(lambda = function(t) 1 + sin(t))

[Package nhppp version 0.1.4 Index]