Title: | Bayesian Estimation of the ETAS Model for Earthquake Occurrences |
---|---|
Description: | The Epidemic Type Aftershock Sequence (ETAS) model is one of the best-performing methods for modeling and forecasting earthquake occurrences. This package implements Bayesian estimation routines to draw samples from the full posterior distribution of the model parameters, given an earthquake catalog. The paper on which this package is based is Gordon J. Ross - Bayesian Estimation of the ETAS Model for Earthquake Occurrences (2016), available from the below URL. |
Authors: | Gordon J. Ross |
Maintainer: | Gordon J. Ross <[email protected]> |
License: | GPL-3 |
Version: | 1.0.3 |
Built: | 2024-11-24 05:24:16 UTC |
Source: | https://github.com/cran/bayesianETAS |
Bayesian estimation of the ETAS model for earthquake occurrences
Gordon J Ross [email protected]
Gordon J. Ross - Bayesian Estimation of the ETAS Model for Earthquake Occurrences (2016), available from http://www.gordonjross.co.uk/bayesianetas.pdf
The Epidemic Type Aftershock Sequence (ETAS) model is widely used to quantify the degree of seismic activity in a geographical region, and to forecast the occurrence of future mainshocks and aftershocks (Ross 2016). The temporal ETAS model is a point process where the probability of an earthquake occurring at time depends on the previous seismicity
, and is defined by the conditional intensity function:
where
and
where the summation is over all previous earthquakes that occurred in the region, with the i'th such earthquake occurring at time and having magnitude
. The quantity
denotes the magnitude of completeness of the catalog, so that
for all i. The temporal ETAS model has 5 parameters:
controls the background rate of seismicity,
and
determine the productivity (average number of aftershocks) of an earthquake with magnitude
, and
and
are the parameters of the Modified Omori Law (which has here been normalized to integrate to 1) and represent the speed at which the aftershock rate decays over time. Each earthquake is assumed to have a magnitude which is an independent draw from the Gutenberg-Richter law
.
This function estimates the parameters of the ETAS model using maximum likelihood
maxLikelihoodETAS(ts, magnitudes, M0, T, initval = NA, displayOutput = TRUE)
maxLikelihoodETAS(ts, magnitudes, M0, T, initval = NA, displayOutput = TRUE)
ts |
Vector containing the earthquake times |
magnitudes |
Vector containing the earthquake magnitudes |
M0 |
Magnitude of completeness. |
T |
Length of the time window [0,T] the catalog was observed over. If not specified, will be taken as the time of the last earthquake. |
initval |
Initial value at which to start the estimation. A vector, with elements (mu, K, alpha, c, p) |
displayOutput |
If TRUE then prints the out the likelihood during model fitting. |
A list consisting of
params |
A vector containing the estimated parameters, in the order (mu,K,alpha,c,p,beta) |
loglik |
The corresponding loglikelihood |
Gordon J Ross
Gordon J. Ross - Bayesian Estimation of the ETAS Model for Earthquake Occurrences (2016), available from http://www.gordonjross.co.uk/bayesianetas.pdf
## Not run: beta <- 2.4; M0 <- 3; T <- 500 catalog <- simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T) maxLikelihoodETAS(catalog$ts, catalog$magnitudes, M0, 500) ## End(Not run)
## Not run: beta <- 2.4; M0 <- 3; T <- 500 catalog <- simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T) maxLikelihoodETAS(catalog$ts, catalog$magnitudes, M0, 500) ## End(Not run)
This function implements the latent variable MCMC scheme from (Ross 2016) which draws samples from the Bayesian posterior distribution of the Epidemic Type Aftershock Sequence (ETAS) model.
The ETAS model is widely used to quantify the degree of seismic activity in a geographical region, and to forecast the occurrence of future mainshocks and aftershocks (Ross 2016). The temporal ETAS model is a point process where the probability of an earthquake occurring at time depends on the previous seismicity
, and is defined by the conditional intensity function:
where
and
where the summation is over all previous earthquakes that occurred in the region, with the i'th such earthquake occurring at time and having magnitude
. The quantity
denotes the magnitude of completeness of the catalog, so that
for all i. The temporal ETAS model has 5 parameters:
controls the background rate of seismicity,
and
determine the productivity (average number of aftershocks) of an earthquake with magnitude
, and
and
are the parameters of the Modified Omori Law (which has here been normalized to integrate to 1) and represent the speed at which the aftershock rate decays over time. Each earthquake is assumed to have a magnitude which is an independent draw from the Gutenberg-Richter law
.
sampleETASposterior(ts, magnitudes, M0, T = NA, initval = NA, approx = FALSE, sims = 5000, burnin = 500)
sampleETASposterior(ts, magnitudes, M0, T = NA, initval = NA, approx = FALSE, sims = 5000, burnin = 500)
ts |
Vector containing the earthquake times |
magnitudes |
Vector containing the earthquake magnitudes |
M0 |
Magnitude of completeness. |
T |
Length of the time window [0,T] the catalog was observed over. If not specified, will be taken as the time of the last earthquake. |
initval |
Initial value at which to start the estimation. If specified, should be a vector, with elements (mu, K, alpha, c, p). If unspecified, the sampler will be initialized at the maximum likelihood estimate of the model parameters |
approx |
If TRUE then will approximate the true posterior using the infinite time approximation discussed in (Ross 2016) |
sims |
Number of posterior samples to draw |
burnin |
Number of burnin samples |
A matrix containing the posterior samples. Each row is a single sample, and the columns correspond to (mu, K, alpha, c, p)
Gordon J Ross
Gordon J. Ross - Bayesian Estimation of the ETAS Model for Earthquake Occurrences (2016), available from http://www.gordonjross.co.uk/bayesianetas.pdf
## Not run: beta <- 2.4; M0 <- 3; T <- 500 catalog <- simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T) sampleETASposterior(catalog$ts, catalog$magnitudes, M0, T, sims=5000) ## End(Not run)
## Not run: beta <- 2.4; M0 <- 3; T <- 500 catalog <- simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T) sampleETASposterior(catalog$ts, catalog$magnitudes, M0, T, sims=5000) ## End(Not run)
This function simulates sample data from the ETAS model over a particular interval [0,T].
The Epidemic Type Aftershock Sequence (ETAS) model is widely used to quantify the degree of seismic activity in a geographical region, and to forecast the occurrence of future mainshocks and aftershocks (Ross 2016). The temporal ETAS model is a point process where the probability of an earthquake occurring at time depends on the previous seismicity
, and is defined by the conditional intensity function:
where
and
where the summation is over all previous earthquakes that occurred in the region, with the i'th such earthquake occurring at time and having magnitude
. The quantity
denotes the magnitude of completeness of the catalog, so that
for all i. The temporal ETAS model has 5 parameters:
controls the background rate of seismicity,
and
determine the productivity (average number of aftershocks) of an earthquake with magnitude
, and
and
are the parameters of the Modified Omori Law (which has here been normalized to integrate to 1) and represent the speed at which the aftershock rate decays over time. Each earthquake is assumed to have a magnitude which is an independent draw from the Gutenberg-Richter law
.
This function simulates sample data from the ETAS model over a particular interval [0,T].
simulateETAS(mu, K, alpha, c, p, beta, M0, T, displayOutput = TRUE)
simulateETAS(mu, K, alpha, c, p, beta, M0, T, displayOutput = TRUE)
mu |
Parameter of the ETAS model as described above. |
K |
Parameter of the ETAS model as described above. |
alpha |
Parameter of the ETAS model as described above. |
c |
Parameter of the ETAS model as described above. |
p |
Parameter of the ETAS model as described above. |
beta |
Parameter of the Gutenberg-Richter law used to generate earthquake magnitudes. |
M0 |
Magnitude of completeness. |
T |
Length of the time window [0,T] to simulate the catalog over. |
displayOutput |
If TRUE then prints the number of earthquakes simulated so far. |
A list consisting of
ts |
The simulated earthquake times |
magnitudes |
The simulated earthquake magnitudes |
branching |
The simulated branching structure, where branching[i] is the index of the earthquake that triggered earthquake i, or 0 if earthquake i is a background event |
Gordon J Ross
Gordon J. Ross - Bayesian Estimation of the ETAS Model for Earthquake Occurrences (2016), available from http://www.gordonjross.co.uk/bayesianetas.pdf
## Not run: beta <- 2.4; M0 <- 3 simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T=500, displayOutput=FALSE) ## End(Not run)
## Not run: beta <- 2.4; M0 <- 3 simulateETAS(0.2, 0.2, 1.5, 0.5, 2, beta, M0, T=500, displayOutput=FALSE) ## End(Not run)
Simulates event times from an inhomogenous Poisson process on [0,T]
simulateNHPP(targetfn, maxintensity, T = Inf)
simulateNHPP(targetfn, maxintensity, T = Inf)
targetfn |
A first order function defining the process intensity |
maxintensity |
The maximum values of targetfn |
T |
Length of the interval [0,T] on which to simulate the process |
The simulated event times
Gordon J Ross
simulateNHPP(function(x) {sin(x)+1}, 2, 100) simulateNHPP(function(x) {x^2}, 100, 10)
simulateNHPP(function(x) {sin(x)+1}, 2, 100) simulateNHPP(function(x) {x^2}, 100, 10)