Description Usage Arguments Value Author(s) References Examples

View source: R/sampleETASposterior.R

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 *t* depends on the previous seismicity *Ht*, and is defined by the conditional intensity function:

* λ(t|Ht) = μ + ∑ κ(m[i]|K,α) h(t[i]|c,p)*

where

*κ(m[i]|K,α) = K * exp(α(m[i]-M0))*

and

* h(t[i]|c,p) = (p-1) * c^(p-1) * (t-t[i]+c)^(-p)*

where the summation is over all previous earthquakes that occurred in the region, with the i'th such earthquake occurring at time *t[i]* and having magnitude *m[i]*. The quantity *M0* denotes the magnitude of completeness of the catalog, so that *m[i] ≥ M0* for all i. The temporal ETAS model has 5 parameters: *μ* controls the background rate of seismicity, * K* and * α* determine the productivity (average number of aftershocks) of an earthquake with magnitude *m*, and *c* and * p* 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 * p(m) = β * exp(β(m-M0)*.

1 2 |

`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

1 2 3 4 5 6 | ```
## 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)
``` |

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.