# NOT RUN {
  # 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)
  
# }
# NOT RUN {
  plot(iran.cat)
# }
# NOT RUN {
  # 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
  
# }
# NOT RUN {
  iran.fit <- etas(iran.cat, param0=param01)
# }
# NOT RUN {
  # estimating the declustering probabilities
  
# }
# NOT RUN {
  pr <- probs(iran.fit)
  plot(iran.cat$longlat.coord[,1:2], cex=2 * (1 - pr$prob))
# }
# NOT RUN {
  # estimating the  background seismicity rate and clustering coefficient
  
# }
# NOT RUN {
  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