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

Description Usage Arguments Value See Also Examples

View source: R/mint.R

h(t)=ν(t)+\int_0^t g(t-s)h(s)ds, t≥q 0

, where the excitation function is exponential: g(t)= γ_1 e^{-γ_2 t}.

Description

Mean Intensity of the Self-Exciting Point Process With an Exponential Excitation Function h.fn.exp calculates the mean intensity function h(t) which solves the integral equation

h(t)=ν(t)+\int_0^t g(t-s)h(s)ds, t≥q 0

, where the excitation function is exponential: g(t)= γ_1 e^{-γ_2 t}.

Usage

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

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 γ_1,γ_2 of the exponential excitation function

Value

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

See Also

h.fn

Examples

1
2
3
4
5
6
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)

Example output

  [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[112] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[149] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[186] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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