powered by
Sampling from NHPPPs with piecewise constant intensities with same interval lengths (non-vectorized)
draw_sc_step_regular( Lambda_vector = NULL, lambda_vector = NULL, t_min = NULL, t_max = NULL, atmost1 = FALSE, atleast1 = FALSE )
a vector of event times t if no events realize, it will have 0 length
(scalar, double) K integrated intensity rates at the end of each interval
K
(scalar, double) K constant intensity rates, one per interval
(scalar, double) lower bound of the time interval
(scalar, double) upper bound of the time interval
boolean, draw at most 1 event time
boolean, draw at least 1 event time
x <- draw_sc_step_regular(Lambda_vector = 1:5, t_min = 0, t_max = 5)
Run the code above in your browser using DataLab