Create a new hawkes model with given arguments

new_hawkes(
  model_type,
  par = NULL,
  data = NULL,
  init_par = NULL,
  observation_time = NULL,
  lower_bound = NULL,
  upper_bound = NULL,
  model_vars = NULL
)

Arguments

model_type

A string indicates the model tyep, e.g. EXP for a Hawkes process with an exponential kernel

par

A named vector denotes the model parameters where the names are model parameters and the values are the corresponding parameter values

data

A list of data.frame(s) where each data.frame is an event cascade with event tims and event magnitudes (optional)

init_par

Initial parameter values used in fitting

observation_time

The event cascades observation time. It is assumed that all cascades in data are observed until a common time.

lower_bound

Model parameter lower bounds. A named vector where names are model parameters and values are the lowest possible values.

upper_bound

Model parameter upper bounds. A named vector where names are model parameters and values are the largest possible values.

model_vars

A named list of extra variables provided to hawkes objects

Value

A model object with class [hawkes] and [hawkes_`model_type`] where `model_type` is replaced by the given model_type

Examples

data <- list(data.frame(time = c(0, 0.5, 1))) new_hawkes(model_type = 'EXP', par = c(K = 0.9, theta = 1), data = data, observation_time = Inf)
#> - Model: EXP #> - No. of cascades: 1 #> - init_par: #> K NA; theta NA #> - par: #> K 9.00e-01; theta 1.00e+00 #> - Neg Log Likelihood: NA #> - lower_bound: #> K 1.00e-100; theta 1.00e-100 #> - upper_bound: #> K 1.00e+04; theta 3.00e+02