Learn R Programming

IHSEP (version 0.3.1)

simHawkes1a: Simulate an (inhomogeneous) Hawkes self-exciting process simHawkes1a simulates the event times of an inhomogeneous Hawkes process (IHSEP) with background event intensity/rate \(nu(\cdot)\geq 0\), branching ratio \(\eta\in[0,1)\), and offspring birthtime density \(g(\cdot)\), up to a censoring time \(T\).

Description

Simulate an (inhomogeneous) Hawkes self-exciting process simHawkes1a simulates the event times of an inhomogeneous Hawkes process (IHSEP) with background event intensity/rate \(nu(\cdot)\geq 0\), branching ratio \(\eta\in[0,1)\), and offspring birthtime density \(g(\cdot)\), up to a censoring time \(T\).

Usage

simHawkes1a(
  nu = function(x) rep(100, length(x)),
  cens = 1,
  nuM = max(optimize(nu, c(0, cens), maximum = TRUE)$obj, nu(0), nu(cens),
    .Machine$double.eps^0.5) * 1.1,
  br = 0.5,
  dis = "exp",
  par.dis = list(rate = 1)
)

Value

a vector giving the event times of an inhomogeneous Hawkes process up to the censoring time in ascending order.

Arguments

nu

a function, which gives the background event intensity function \(\nu(\cdot)\); needs to be a bounded function on \([0,T]\).

cens,

a positive scalar, which gives the censoring time.

nuM,

positive scalar, optional argument giving the maximum of the background intensity function on \([0,T]\).

br,

scalar in [0,1), giving the branching ratio.

dis,

character string giving the name of the child birthtime distribution; 'd$dis' gives the density function \(g(\cdot)\).

par.dis,

a (named) list giving the values of the parameters of the child birthtime distribution.