Learn R Programming

IHSEP (version 0.3.1)

h.fn.exp: Mean Intensity of the Self-Exciting Point Process With an Exponential Excitation Function

Description

h.fn.exp calculates the mean intensity function \(h(t)\) which solves the integral equation $$h(t)=\nu(t)+\int_0^t g(t-s)h(s)ds, t\geq 0$$, where the excitation function is exponential: \(g(t)= \gamma_1 e^{-\gamma_2t}\).

Usage

h.fn.exp(x, nu, g.p = c(4, 8))

Value

a numric scalar which gives the value of the function \(h\) at x.

Arguments

x

numerical scalar, at which the mean intensity \(h\) is to be evaluated

nu

a function, which gives the baseline event rate

g.p

a numeric vector of two elements giving the two parameters \(\gamma_1,\gamma_2\) of the exponential excitation function

See Also

h.fn

Examples

Run this code
nu <- function(x)200+100*cos(pi*x);
x <- 1:500/100;
y <- sapply(x,h.fn.exp,nu=nu,g.p=c(2,1));
h <- splinefun(x,y);
g <- function(x)2*exp(-x)
round(nu(x)+sapply(x,function(x)integrate(function(u)g(x-u)*h(u),0,x)$value) - y,5)

Run the code above in your browser using DataLab