
Log-likelihood of a spatiotemporal Hawkes process
Source:R/hawkes_spatial.R
morie_hawkes_st_loglik.RdEvaluates \(\sum_j \log\lambda(t_j,x_j,y_j) - \int \lambda\), with the compensator \(\mu\,T\,A + \sum_i \alpha(1 - e^{-\beta(T - t_i)})\) (the spatial kernel integrates to 1 over the plane; interior-region boundary effects are neglected, standard for events away from the edge).
Examples
ev <- morie_hawkes_st_simulate(
list(mu = 0.2, alpha = 0.5, beta = 1, sigma = 0.3),
end_time = 20, region = c(0, 10, 0, 10), seed = 1)
morie_hawkes_st_loglik(ev, list(mu = 0.2, alpha = 0.5, beta = 1, sigma = 0.3),
end_time = 20, area = 100)
#> [1] -1348.227