inhpois {hawkesbow} | R Documentation |
Simulation of an inhomogeneous Poisson process by thinning
Description
Simulates an inhomogeneous Poisson process via Ogata's modified thinning algorithm on [0,\mathrm{end}]
.
An homogeneous Poisson process with intensity M
is first generated on [0,\mathrm{end}]
, then thinned using the specified intensity function fun
.
Usage
inhpois(end, fun, M = NULL)
Arguments
end |
A non-negative numeric value - right bound of the interval |
fun |
A non-negative function or numeric value - intensity (function) of the Poisson process. |
M |
(default = NULL) A non-negative numeric value - upper bound on |
Value
A S3 object of class inhpois
containing a vector ($p) of simulated values,
and all other objects used for the simulation.
Examples
# Simulate an inhomogeneous Poisson process with function intensity 1 + sin(x) (bounded by 2)
x <- inhpois(end=10, fun=function(y) {1 + sin(y)}, M=2)
# Simulate a homogeneous Poisson process with intensity 3
x <- inhpois(end=10, fun=3)
[Package hawkesbow version 1.0.3 Index]