gif {PtProcess} | R Documentation |
General Notes on Ground Intensity Functions
Description
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.
Forms of Usage
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)
Arguments
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
a data frame containing the history of the process, denoted below as
{\cal H}_t
. It should contain all variables that are required to evaluate thegif
function, though can contain others too. No history is represented asNULL
.evalpts
a object containing the values at which the
gif
function is to be evaluated, consistent with what is required by thegif
function.params
vector containing values of the parameters required by the
gif
function.TT
vector of length 2, being the time interval over which the integral of the ground intensity function is to be evaluated.
tplus
logical,
\lambda_g(t|{\cal H}_t)
is evaluated as\lambda_g(t^+|{\cal H}_t)
ifTRUE
, else\lambda_g(t^-|{\cal H}_t)
. It is important if a “jump” occurs att
.
Details
Note that the gif
functions not only evaluate values of \lambda_g(t_i|{\cal H}_t)
, 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
).
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|{\cal H}_t)
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.
Value
The returned value is either \lambda_g(t_i|{\cal H}_t)
, where the t_i
are specified within evalpts
; or
\int \lambda_g(t|{\cal H}_t) dt
where the limits of the integral are specified by the function argument TT
.
Function Attributes
Each function should have some of the following attributes if it is to be used in conjunction with residuals.mpp
or simulate.mpp
:
rate
must be specified if the default method for
simulate.mpp
is to be used. Takes the values"bounded"
,"decreasing"
or"increasing"
; see Details.regions
an expression giving the number of regions; required with
linksrm_gif
.
See Also
etas_gif
, expfourier_gif
, exppoly_gif
, fourier_gif
, linksrm_gif
, poly_gif
, simple_gif
, srm_gif
Examples
# 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))