vdraw_sc_step_regular: Vectorized sampling from 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
vdraw_sc_step_regular(
Lambda_matrix = NULL,
lambda_matrix = NULL,
range_t = c(0, 10),
tol = 10^-6,
atmost1 = FALSE
)
Value
a vector of event times t
if no events realize, it will have 0 length
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
- tol
(scalar, double) tolerance for the number of events
- atmost1
boolean, draw at most 1 event time
Examples
Run this codex <- vdraw_sc_step_regular(Lambda_matrix = matrix(1:5, nrow = 1))
Run the code above in your browser using DataLab