mcmc_temporal {stpphawkes}R Documentation

Bayesian Estimation of Temporal Hawkes Model Parameters

Description

This function computes the posterior of the parameters of a temporal exponential decay Hawkes model using Metropolis-with-in-Gibbs sampling.

Usage

mcmc_temporal(
  times,
  t_max = max(times),
  t_mis = NULL,
  param_init = NULL,
  mcmc_param = NULL,
  branching = TRUE,
  print = TRUE
)

Arguments

times

- vector of arrival times

t_max

- maximum time value (default = max(times))

t_mis

- mx2 matrix, mth row contains two elements describing the mth missing time range (default = NULL)

param_init

- list of parameters of initial guess (default = NULL, will start with MLE)

mcmc_param

- list of mcmc parameters

branching

- using branching structure in estimation (default = TRUE)

print

- print progress (default = TRUE)

Details

The default is to estimate the branching structure which is much more computationally efficient. The model will also account to missing data if t_mis is provided.

Branching models specify gamma priors for mu, alpha and beta parameters.

Value

A DataFrame containing the mcmc samples

Examples


times = simulate_temporal(.5,.1,.5,c(0,10),numeric()) 
out = mcmc_temporal(times)


[Package stpphawkes version 0.2.1 Index]