Exponential Multivariate Hawkes Model

Simulate and fit multivariate Hawkes models with exponential kernels, introduced by Hawkes (1971) . Includes marked, state-dependent, and multi-kernel specifications. Parameter estimation uses maximum likelihood, following Ozaki (1979) , through the optional 'maxLik' package or the optimization functions supplied with R.


emhawkes

emhawkes specifies, simulates, and fits exponential Hawkes models, including marked, state-dependent, and multi-kernel models.

Installation

Install the CRAN release:

install.packages("emhawkes")

For the development version and the features described in the guides:

# install.packages("remotes")
remotes::install_github("ksublee/emhawkes")

Source installation requires a C++ compiler and Rcpp; on Windows, install Rtools.

Quick start

This example requires version 1.0.0 or later.

library(emhawkes)

h <- new("hspec", mu = 0.3, alpha = 1.2, beta = 1.5)
set.seed(1107)
path <- hsim(h, size = 1000)
fit <- hfit(h, inter_arrival = path$inter_arrival, optimizer = "stats")
summary(fit)

hsim() returns an hreal path. The example uses R's optimizers and returns an emhawkes_stats_fit. By default, hfit() uses the optional maxLik package and returns a maxLik fit; install it with install.packages("maxLik") to use that provider. The first path row is the initial state, so size includes that row.

Simulation and fitting default to lambda_component0 = "auto" and report the selected initialization. Supported stable constant linear models use mean intensity components; other models use zero components and recommend supplying an initial state. These components exclude the baseline intensity.

Documentation

  • Get started: the basic workflow, input data and a first diagnostic.
  • Fitting and inference: parameter sharing, initial states, fitted models, residuals and standard errors.
  • Extended examples: marked, state-dependent, multi-kernel and flexible residual models.
  • Computation: R/C++ engines, gradients, Jacobians and performance.
  • Reference and News: function details and version changes.

The basic vignette is also available in R with vignette("example", package = "emhawkes"). The website is built from this repository; the version in its header identifies the documented package.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("emhawkes")

1.0.0 by Kyungsub Lee, 11 hours ago


https://github.com/ksublee/emhawkes, https://ksublee.github.io/emhawkes/


Report a bug at https://github.com/ksublee/emhawkes/issues


Browse source code at https://github.com/cran/emhawkes


Authors: Kyungsub Lee [aut, cre]


Documentation:   PDF Manual  


GPL (>= 2) license


Imports methods, Rcpp, stats

Suggests maxLik, knitr, rmarkdown, miscTools

Linking to Rcpp


See at CRAN