Skip to contents

Fits 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
)

Arguments

df

Data frame with OCC_DATE or REPORT_DATE.

ds_name

Dataset name used in titles.

max_n

Maximum events to fit.

baselines

Baseline kinds to sweep over.

kernels

Kernel kinds to sweep over.

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.

References

Kwan TKJ, Chen F, Dunsmuir WTM (2024). arXiv:2408.09710.

Examples

if (FALSE) { # \dontrun{
  df <- morie_tps_load_tps_dataset("Assault", nrows = 3000)
  rr <- morie_tps_compare_hawkes_kernels(df, ds_name = "Assault")
} # }