powered by
Simulates a Hawkes process via Ogata's modified thinning algorithm on \([0,\mathrm{end}]\). This is less efficient than function hawkes, but can be useful for pedagogical reasons.
hawkes
hawkes_ogata(end, lambda, alpha, beta, lambda0 = NULL)
A S3 object of class Hawkes containing a vector ($p) of simulated values, and all other objects used for the simulation.
Right bound on time.
Baseline intensity.
Parameter for the amplitude of the spike.
Parameter for the speed of exponential decay.
(Optional) Initial value of the conditional intensity.
# Simulate an exponential Hawkes process with baseline intensity 1 and # excitation function 1*exp(-2t) x <- hawkes_ogata(10, 1, 1, 2) plot(x)
Run the code above in your browser using DataLab