h.fn | R Documentation |
h.fn
calculate the values of the mean intensity function of the
self-exciting process with given baseline event rate and excitation
function at a (fairly large) number of points. Values of the function at
other points can be obtained by interpolation (e.g. spline
interpolation).
h.fn(nu, g, N = 2^12, to = 1, abs.tol = 1e-10, maxit = 100)
nu |
a (vectorized) function specifying the baseline invent rate of the SEPP |
g |
a (vectorized) function specifying the excitation function of the SEPP |
N |
an integer giving the number of equal sized intervals to partition the domain into during the calculation The larger this value is, the more accurately the solution approxmates the truth, and the more time requred to evaluate. |
to |
a numeric scalar, the end point of the estimation domain |
abs.tol |
a numeric scalar specifying the absolute tolerance of error |
maxit |
an integer specifying the maximal number of iterations allowed |
a list with elelents, x
: the vector of the points where h is evaluated; y
: the vector of the corresponding h values; nit
: the number of iterations used; G.err
: the approximation error in G.
h.fn.exp
## Not run: nu <- function(x)(200+100*cos(pi*x))*(x>=0); g <- function(x) 2*exp(-x) h.l <- h.fn(nu=nu,g=g,to=5); h <- splinefun(h.l$x,h.l$y); x <- 1:500/100; max(nu(x)+sapply(x,function(x)integrate(function(u)g(x-u)*h(u),0,x)$value) - h(x)) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.