Description Usage Arguments Details Value References See Also Examples
This function generates the occurrence points in a homogenous or nonhomogeneous Poisson process (NHPP) with a given intensity λ(t), in a continuous period of time (0, T).
It calls the auxiliary function buscar
(not intended for the users), see Details.
1 |
lambda |
Numeric vector. Intensity λ(t) used to generate the Poisson process. Its length determines the length of the observed period. |
fixed.seed |
An integer or NULL. If it is an integer, that is the value used to set the seed in random generation processes. It it is NULL, a random seed is used. |
algor |
Optional. Character string. The algorithm used to generate the process, it can be "Inversion" or "Thinning"; see Details. |
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 λ(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 λ_{max}=\max_t λ(t) and the resulting points are retained with probability λ(t_i)/λ_{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).
A list with elements:
posNH |
Numeric vector. Occurrence points of the Poisson process. |
lambda |
Input argument. |
fixed.seed |
Input argument. |
Banerjee, S., Carlin, B.P. and Gelfand, A. E. (2014) Hierarchical modeling and analysis for spatial data.CRC Press.
Ross, S.M. (2006). Simulation. Academic Press.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.