hawkes_ogata: Simulation of a Hawkes process

Description Usage Arguments Value Examples

View source: R/hawkes_ogata.R

Description

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.

Usage

1
hawkes_ogata(end, lambda, alpha, beta, lambda0 = NULL)

Arguments

end

Right bound on time.

lambda

Baseline intensity.

alpha

Parameter for the amplitude of the spike.

beta

Parameter for the speed of exponential decay.

lambda0

(Optional) Initial value of the conditional intensity.

Value

A S3 object of class Hawkes containing a vector ($p) of simulated values, and all other objects used for the simulation.

Examples

1
2
3
4
# Simulate an exponential Hawkes process with baseline intensity 1 and
# excitation function 1*exp(-2t)
x <- hawkes_ogata(10, 1, 1, 2)
plot(x)

hawkesbow documentation built on April 10, 2021, 1:07 a.m.