gif {PtProcess} | R Documentation |
This page contains general notes about the required structure of ground intensity functions (including those that are not conditional on their history) to be used with this package.
The usage of a ground intensity function takes two forms, one to evaluate the gif
at specified evalpts
, or to evaluate the integral of the gif
on the interval TT
, each shown below, respectively.
gif(data, evalpts, params, tplus=FALSE)
gif(data, NULL, params, TT)
All ground intensity functions should be defined to contain the following arguments, in the order below, even though they may not be required (see Details below).
data
gif
function, though can contain others too. No history is represented as NULL
.evalpts
gif
function is to be evaluated, consistent with what is required by the gif
function.params
gif
function.TT
tplus
TRUE
, else lambda_g(t^-|Ht). It is important if a “jump” occurs at t.
Note that the gif
functions not only evaluate values of lambda_g(ti|Ht), but also the integral. The value of the ground intensity function is returned at each time point specified in evalpts
when TT==NA
. If TT
is not missing, the integral between TT[1]
and TT[2]
of the ground intensity function is calculated. In this last situation, anything assigned to the argument evalpts
will have no effect.
At the moment, we have the following types of processes: those jump processes that are conditional on their history (etas_gif
, srm_gif
, linksrm_gif
), and non-homogeneous Poisson processes that are not conditional on their history (simple_gif
). Another case is where we have a collection of point like “regions” (or lattice nodes), each with their own ground intensity function, but where each is also dependent on what is happening in the other regions (linksrm_gif
). The attribute “type” determines the “methods” used for simulation (simulate.mpp
) and residual analyses (residuals.mpp
).
Functions have been given an attribute “rate”, taking the values of "bounded"
, "decreasing"
or "increasing"
. This is used within the simulation function simulate.mpp
which uses the thinning method. This method requires a knowledge of the maximum of lambda_g(t|Ht) in a given interval. The argument tplus
is also used by the simulation routine, where it is necessary to determine the value of the intensity immediately after a simulated event.
The returned value is either lambda_g(ti|Ht), where the ti are specified within evalpts
; or
integral{ lambda_g(t|Ht) dt }
where the limits of the integral are specified by the function argument TT
.
Each function should have some of the following attributes if it is to be used in conjunction with residuals.mpp
or simulate.mpp
:
rate
simulate.mpp
is to be used. Takes the values "bounded"
, "decreasing"
or "increasing"
; see Details.regions
linksrm_gif
.type
"default"
or "linksrm"
, and indicates the “methods” to be used by residuals.mpp
and simulate.mpp
. If type is not specified, then the "default"
method is used.
etas_gif
, expfourier_gif
, exppoly_gif
, fourier_gif
, linksrm_gif
, poly_gif
, simple_gif
, srm_gif
# Ogata's Data: ground intensity function # evaluate lambda_g(t) at certain times data(Ogata) p <- c(0.02, 70.77, 0.47, 0.002, 1.25) times <- sort(c(seq(0, 800, 0.5), Ogata$time)) TT <- c(0, 800) plot(times, log(etas_gif(Ogata, times, params=p)), type="l", ylab=expression(paste(log, " ", lambda[g](t))), xlab=expression(t), xlim=TT) # Evaluate the integral # The first form below is where the arguments are in their # default positions, the 2nd is where they are not, hence # their names must be specified print(etas_gif(Ogata, NULL, p, TT)) # or print(etas_gif(Ogata, params=p, TT=TT))