get_hawkes_neg_likelihood_value: Compute the negative log-likelihood values of a given model...

View source: R/fit.R

get_hawkes_neg_likelihood_valueR Documentation

Compute the negative log-likelihood values of a given model on a list of given event cascades.

Description

Compute the negative log-likelihood values of a given model on a list of given event cascades.

Usage

get_hawkes_neg_likelihood_value(
  model,
  ...,
  par,
  data,
  model_type,
  observation_time
)

Arguments

model

An object of a specific model class where the 'data' and the 'par' fields are required.

...

Further arguments passed to ampl

par

Hawkes model parameters

data

A list of data.frames of event cascades

model_type

The Hawkes model type

observation_time

The observation time of the given event cascades

Value

A single number, the negative log-likelihood of the given model on data

Examples

## Not run: 
data <- generate_series(model_type = 'EXP',
                                     par = c(K = 0.9, theta = 1),
                                     sim_no = 10, Tmax = Inf)
fitted <- fit_series(data, 'EXP', observation_time = Inf)
data_test <- generate_series(model_type = 'EXP',
                                          par = c(K = 0.9, theta = 1),
                                          sim_no = 10, Tmax = Inf)
get_hawkes_neg_likelihood_value(fitted, data = data_test)

## End(Not run)

behavioral-ds/evently documentation built on Feb. 3, 2023, 9:42 a.m.