Description Forms of Usage Arguments Details Value Function Attributes See Also Examples

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`

a data frame containing the history of the process, denoted below as

*Ht*. It should contain all variables that are required to evaluate the`gif`

function, though can contain others too. No history is represented as`NULL`

.`evalpts`

a object containing the values at which the

`gif`

function is to be evaluated, consistent with what is required by the`gif`

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|Ht)*is evaluated as*lambda_g(t^+|Ht)*if`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`

).

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`

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`

.

`etas_gif`

, `expfourier_gif`

, `exppoly_gif`

, `fourier_gif`

, `linksrm_gif`

, `poly_gif`

, `simple_gif`

, `srm_gif`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ```
# 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))
``` |

```
[1] 85.05857
[1] 85.05857
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.