Two algorithms to generate the NHPP points are implemented. "Inversion" is based on the inversion algortihm,
see Ross(2006), and it consists in two steps.
First, the points of a homogeneous Poisson process of intensity one are generated using
independent exponentials. Then, the homogeneous occurrence times are transformed into
the points of a nonhomogeneous process with intensity \(\lambda(t)\).
This transformation is performed by the auxiliary function buscar
(not intended for the user).
The algorithm "Thinning", see Banerjee et al. (2014), generates the occurrences times
in a homogeneous Poisson process with intensity \(\lambda_{max}=\max_t \lambda(t)\) and the resulting points are retained
with probability \(\lambda(t_i)/\lambda_{max}\).
The "Inversion" algorithm requires positive values of the argument lambda
and it is slower, but
the "Thinning" algorithm may yield excesive rejection according to Ross (2006).
The lenght of the period where the processes are generated is determined by the length of
the argument lambda
.
Homogenous processes are generated if the intensity vector lambda
is constant
(that is if all the values are equal).