
Simulate a spatiotemporal Hawkes process (immigrant-offspring branching)
Source:R/hawkes_spatial.R
morie_hawkes_st_simulate.RdExact simulation via the branching construction (Hawkes & Oakes 1974): immigrants are a homogeneous Poisson process of rate \(\mu\) over the region and horizon; each event spawns \(\mathrm{Poisson}(\alpha)\) offspring at exponential-\(\beta\) time lags and Gaussian-\(\sigma\) spatial offsets, recursively. Requires \(\alpha < 1\).
Examples
morie_hawkes_st_simulate(list(mu = 0.1, alpha = 0.4, beta = 1, sigma = 0.5),
end_time = 10, region = c(0, 5, 0, 5), seed = 42)
#> t x y gen
#> 1 0.8243756 3.74397693 1.168516993 0
#> 2 1.1748736 4.85483305 0.007852771 0
#> 3 1.3466660 4.53300704 1.202723698 0
#> 4 1.3871017 1.99242706 3.228159392 0
#> 5 2.5542882 2.15875624 3.596779188 0
#> 6 2.8613953 3.42584865 4.248448593 0
#> 7 3.0232615 3.71634690 4.157070240 1
#> 8 3.7551686 3.77592737 3.965903376 2
#> 9 3.8810828 2.83244212 4.628223743 0
#> 10 3.9020347 0.85632165 0.428060325 0
#> 11 4.1281555 2.28771696 4.292334417 1
#> 12 4.4696963 2.57206467 3.337132573 0
#> 13 4.5774178 2.17885792 1.081927075 0
#> 14 4.6229282 4.78788298 0.039423694 0
#> 15 4.7499708 3.09419104 2.908020013 0
#> 16 5.1421178 3.38638415 0.449902582 0
#> 17 5.1909595 0.03667073 4.140792426 0
#> 18 5.6033275 1.66713606 0.789526041 0
#> 19 5.6399547 0.42076010 4.607465590 1
#> 20 5.6496289 1.16232010 -0.301546675 1
#> 21 5.7239866 0.40821383 4.351140462 2
#> 22 5.9515608 3.03374277 2.477623719 1
#> 23 6.2377884 1.06997161 0.223656700 1
#> 24 6.4174552 4.16458040 1.356433074 0
#> 25 6.5699229 3.05889322 0.214943980 0
#> 26 6.9866012 4.83210310 -0.515970746 1
#> 27 7.0506478 1.89779620 0.702395471 0
#> 28 7.1911225 0.18715516 2.396992821 0
#> 29 7.3443370 0.23942207 -0.523155833 2
#> 30 7.3658831 1.03829486 3.466024102 0
#> 31 7.3759562 4.91408599 1.042849785 0
#> 32 7.5930237 -0.25573298 3.093051009 1
#> 33 7.6094189 0.41903896 2.807879376 1
#> 34 7.9091706 0.47307532 4.158824876 2
#> 35 8.1105514 3.79772134 4.665170637 0
#> 36 8.2138803 3.68915141 4.705161913 1
#> 37 8.3044763 0.01974169 0.947369677 0
#> 38 8.3600426 3.37803637 0.001194483 0
#> 39 9.0403139 1.73374124 1.795141529 0
#> 40 9.0573813 1.30543982 1.526091847 0
#> 41 9.3232019 0.81786304 0.292284810 2
#> 42 9.3467225 4.86769957 0.987051711 0
#> 43 9.4001452 4.43877453 1.877449823 0
#> 44 9.4666823 0.19468246 2.818234208 0
#> 45 9.7822643 3.19989385 2.572038542 0
#> 46 9.8889173 3.92346388 3.879116813 0
#> 47 9.9895303 4.31780912 0.748964750 1