etas_gif: Ground Intensity for ETAS Model

Description Usage Arguments Details Value Function Attributes References See Also Examples

View source: R/etas_gif.R

Description

This function calculates the value of the ground intensity of a time-magnitude Epidemic Type Aftershock Sequence (ETAS) model. Spatial coordinates of the events are not taken into account.

Usage

1
etas_gif(data, evalpts, params, TT=NA, tplus=FALSE)

Arguments

data

a data frame containing the event history, where each row represents one event. There must be columns named "time", usually the number of days from some origin; and "magnitude" which is the event magnitude less the magnitude threshold, i.e. Mi - M0.

evalpts

a vector, matrix or data.frame. If a vector, the elements will be assumed to represent the required evaluation times. Other objects must include a column named "time" that can be referred to as evalpts[,"time"], at which the intensity function will be evaluated.

params

vector of parameter values in the following order: (mu, A, alpha, c, p).

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).

Details

The ETAS model was proposed by Ogata (1988, 1998, 1999) for the modelling of earthquake mainshock-aftershock sequences. The form of the ground intensity function used here is given by

lambda_g(t|Ht) = mu + A sum{exp[alpha(Mi - M0)](1 + (t-ti)/c)^(-p)},

where ti denotes the event times and the summation is taken over those i such that ti < t.

Value

Two usages are as follows.

1
2
etas_gif(data, evalpts, params, tplus=FALSE)
etas_gif(data, evalpts=NULL, params, TT)

The first usage returns a vector containing the values of lambda_g(t) evaluated at the specified points. In the second usage, it returns the value of the integral.

Function Attributes

rate

is "decreasing".

References

Cited references are listed on the PtProcess manual page.

See Also

General details about the structure of ground intensity functions are given in the topic gif.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#  Tangshan: ground intensity and magnitude time plots

data(Tangshan)
p <- c(0.007, 2.3, 0.98, 0.008, 0.94)
bvalue <- 1
TT <- c(0, 4018)

x <- mpp(data=Tangshan,
         gif=etas_gif,
         marks=list(dexp_mark, NULL),
         params=p,
         gmap=expression(params),
         mmap=expression(bvalue*log(10)),
         TT=TT)

par.default <- par(mfrow=c(1,1), mar=c(5.1, 4.1, 4.1, 2.1))
par(mfrow=c(2,1), mar=c(4.1, 4.1, 0.5, 1))

plot(x, log=TRUE, xlab="")

plot(Tangshan$time, Tangshan$magnitude+4, type="h",
     xlim=c(0, 4018),
     xlab="Days Since 1 January 1974", ylab="Magnitude")

par(par.default)

Example output



PtProcess documentation built on May 4, 2021, 1:06 a.m.