This code can be used to identify earthquake clusters probabilistically within earthquake catalogues as described in Bayliss, Naylor and Main, 2019.
There are three main components:
1. code to identify nearest-neighbour events in a space-time-magnitude sense as in Zaliapin and Ben-Zion, 2013 (doi:10.1002/jgrb.50178)
2. Code to fit a Weibull mixture model with MCMC (requires R package gtools (https://cran.r-project.org/web/packages/gtools/index.html))
3. Code to construct probabilistic clusters given the nearest neighbour distances and MCMC fits
Code to plot probabilistic networks as in Bayliss et al, 2019, is also included, which uses R packages igraph, intergraph, GGally, ggnetwork and ggplot2.