simHawkes0 | R Documentation |
Simulate an (inhomogeneous) self-exciting process with given background intensity and excitation/fertility function.
simHawkes0(nu, g, cens = 1, nuM=max(optimize(nu,c(0,cens),maximum=TRUE)$obj,nu(0),nu(cens))*1.1, gM=max(optimize(g,c(0,cens),maximum=TRUE)$obj, g(0),g(cens))*1.1)
nu |
A (vectorized) function. The baseline intensity function. |
g |
A (vectorized) function. The excitation function. |
cens |
A scalar. The censoring time, or the time of termination of observations. |
nuM |
A scalar. The maximum time of the baseline intensity from 0 to |
gM |
A scalar. The maximum time of the excitation function from 0 to |
The function works by simulating the birth times generation by generation according to inhomegenous Poisson processes with appropriate intensity functions (ν or g).
A list of vectors of arrival/birth times of individuals/events of generations 0, 1, ....
Same algorithm as in simHawkes1
, though the latter might be
more succinct and (very slightly) faster.
Feng Chen <feng.chen@unsw.edu.au>
simHawkes1
asepp <- simHawkes0(nu=function(x)200*(2+cos(2*pi*x)),nuM=600, g=function(x)8*exp(-16*x),gM=8)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.