# fitting the ETAS model to an Iranian catalog
summary(iran.quakes)
# 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)## End(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
## Not run:
# iran.fit <- etas(iran.cat, param0=param01, no.itr=5)## End(Not run)
# fitting the ETAS model to a Japanese catalog
# preparing the catalog
jpoly <- list(long=c(134.0, 137.9, 143.1, 144.9, 147.8,
137.8, 137.4, 135.1, 130.6), lat=c(31.9, 33.0, 33.2,
35.2, 41.3, 44.2, 40.2, 38.0, 35.4))
jap.cat <- catalog(jap.quakes, time.begin="1966-01-01",
study.start="1970-01-01", study.end="2010-01-01",
region.poly=jpoly, mag.threshold=4.5)
## Not run:
# plot(jap.cat)## End(Not run)
# initial parameters values
param00 <- c(0.6, 0.2, 0.02, 1.5, 1.1, 0.0012, 1.8, 1.0)
# fitting the model
## Not run:
# jap.fit <- etas(jap.cat, param0=param00)## End(Not run)
Run the code above in your browser using DataLab