
Compare Hawkes models across kernel x baseline combinations
Source:R/tps_hawkes_advanced.R
morie_tps_compare_hawkes_kernels.RdFits every supplied (kernel, baseline) combination and ranks by AIC. Mirrors Section 5 of Kwan-Chen-Dunsmuir (2024): the Markovian classical Hawkes is the (exponential, constant) row; the non-Markovian non-stationary models are everything else.
Usage
morie_tps_compare_hawkes_kernels(
df,
ds_name = "?",
max_n = 4000L,
baselines = .TPS_HAWKES_BASELINES,
kernels = .TPS_HAWKES_KERNELS
)Value
A morie_rich_result with a per-combination summary
table, the best (lowest-AIC) combination, and the AIC gap
between the classical Markovian model and the winner.
Details
Combinations that fail to converge are recorded with an error message rather than aborting the whole comparison.
Examples
# \donttest{
df <- morie_tps_load_tps_dataset("Assault", nrows = 500)
#> morie_tps: no local TPS cache for 'Assault'; using the bundled sample from rmoriedata. Fetch the full export with morie_tps_fetch_category().
# A bounded grid (300 events, constant baseline, one kernel pair)
# keeps the example fast; the defaults sweep the full
# baseline x kernel grid over up to 4000 events.
rr <- morie_tps_compare_hawkes_kernels(
df, ds_name = "Assault", max_n = 300L,
baselines = "constant", kernels = c("exponential", "gamma")
)
# }