h.fn.exp | R Documentation |
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^{-γ_2t}.
h.fn.exp(x, nu, g.p = c(4, 8))
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 |
a numric scalar which gives the value of the function h at x
.
h.fn
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.