# preparing the catalog
iran.cat <- catalog(iran.quakes, time.begin="1973/01/01",
study.start="1996/01/01", study.end="2016/01/01",
lat.range=c(25, 42), long.range=c(42, 63), mag.threshold=4.5)
print(iran.cat)
if (FALSE) {
plot(iran.cat)}
# initial parameters values
param01 <- c(0.46, 0.23, 0.022, 2.8, 1.12, 0.012, 2.4, 0.35)
# fitting the model and
if (FALSE) {
iran.fit <- etas(iran.cat, param0=param01)}
# estimating the declustering probabilities
if (FALSE) {
pr <- probs(iran.fit)
plot(iran.cat$longlat.coord[,1:2], cex=2 * (1 - pr$prob))}
# estimating the background seismicity rate and clustering coefficient
if (FALSE) {
rates(iran.fit, dimyx=c(100, 125))
iran.rates <- rates(iran.fit, dimyx=c(200, 250), plot.it=FALSE)
summary(iran.rates$background)}
Run the code above in your browser using DataLab