vdraw_intensity_step_regular {nhppp}R Documentation

Vectorized sampling from a non homogeneous Poisson Point Process (NHPPP) from an interval (thinning method) with piecewise constant_majorizers (C++)

Description

Vectorized sampling from a non homogeneous Poisson Point Process (NHPPP) from an interval (thinning method) with piecewise constant_majorizers. The majorizers are step functions over equal-length time intevals.

Usage

vdraw_intensity_step_regular(
  lambda = NULL,
  lambda_args = NULL,
  Lambda_maj_matrix = NULL,
  lambda_maj_matrix = NULL,
  range_t = NULL,
  subinterval = NULL,
  tol = 10^-6,
  atmost1 = FALSE,
  atmostB = NULL
)

Arguments

lambda

(function) a vectorized intensity function, with one or two arguments. The first is time. The optional second is a named list with additional arguments.

lambda_args

(list) optional list of named arguments for lambda()

Lambda_maj_matrix

(matrix) for the majorizeintegrated intensity rates at the end of each interval

lambda_maj_matrix

(matrix) intensity rates, one per interval

range_t

(vector, or matrix) t_min and t_max, possibly vectorized

subinterval

(matrix, double) subinterval of range_t to sample from

tol

(scalar, double) tolerance for the number of events

atmost1

boolean, draw at most 1 event time

atmostB

If not NULL, draw at most B (B>0) event times. NULL means ignore.

Value

a matrix of event times (columns) per draw (rows) NAs are structural empty spots

Examples

Z <- vdraw_intensity_step_regular(
  lambda = function(x, lambda_args = NULL) 0.1 * x,
  range_t = c(1, 10),
  lambda_maj_matrix = matrix(rep(1, 5), nrow = 1)
)

[Package nhppp version 0.1.4 Index]