vztdraw_sc_step_regular {nhppp}R Documentation

Vectorized sampling from zero-truncated NHPPPs with piecewise constant intensities with same interval lengths

Description

Simulate a piecewise constant-rate Poisson Point Process over ⁠(t_min, t_max]⁠ (inversion method) where the intervals have the same length (are "regular").

Usage

vztdraw_sc_step_regular(
  Lambda_matrix = NULL,
  lambda_matrix = NULL,
  range_t = c(0, 10),
  subinterval = NULL,
  atmost1 = FALSE,
  ...
)

Arguments

Lambda_matrix

(matrix) integrated intensity rates at the end of each interval

lambda_matrix

(matrix) intensity rates, one per interval

range_t

(vector, double) t_min and t_max

subinterval

(vector, double) optional – the subinterval of range_t to sample. If NULL, the whole range_t is used.

atmost1

boolean, draw at most 1 event time

...

(any) other arguments (ignored – used for flexibility in calling from other functions)

Value

a vector of event times t if no events realize, it will have 0 length

Examples

x <- vztdraw_sc_step_regular(Lambda_matrix = matrix(1:5, nrow = 1))

[Package nhppp version 0.1.4 Index]