bmc.bayes: BMC Bayesian Map

Description Usage Arguments Details Value References See Also Examples

Description

Compute the map of the posterior completeness magnitude and posterior standard error based on the maps of the observed and predicted completeness magnitudes.

Usage

1
bmc.bayes(mc.obs, mc.pred, sigma.pred)

Arguments

mc.obs

a data frame of 4 parameters defined by the function mc.geogr:

  • lon the longitude of the cell center

  • lat the latitude of the cell center

  • mc.obs the completeness magnitude mc in the cell

  • sigma.obs the mc standard error in the cell

mc.pred

a vector of mc predicted values per cell

sigma.pred

a vector of the BMC prior model standard deviation, repeated for all cells

Details

This is the final step of the Bayesian Magnitude of Completeness (BMC) method (Mignan et al., 2011).

Value

The data frame of 8 parameters:

References

Mignan, A., Werner, M.J., Wiemer, S., Chen, C.-C., Wu, Y.-M. (2011), Bayesian Estimation of the Spatially Varying Completeness Magnitude of Earthquake Catalogs, Bull. Seismol. Soc. Am., 101, 1371-1385, doi: 10.1785/0120100223

See Also

bmc; bmc.prior; bmc.prior.default; mc.geogr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# download the Southern California relocated catalogue of Hauksson et al. (2012)
url <- "http://service.scedc.caltech.edu/ftp/catalogs/"
cat <- "hauksson/Socal_DD/hs_1981_2011_06_comb_K2_A.cat_so_SCSN_v01"
dat <- scan(paste(url, cat, sep = ""), what = "character", sep = "\n")
yr <- as.numeric(substr(dat, start=1, stop=4))
lat <- as.numeric(substr(dat, start=35, stop=42))
lon <- as.numeric(substr(dat, start=44, stop=53))
m <- as.numeric(substr(dat, start=63, stop=67))
seism <- data.frame(yr = yr, lon = lon,lat = lat, m = m)

# reduce catalogue size for faster computation
seism <- subset(seism, yr >= 2008)

# download the Southern California seismic network data
url <- "http://service.scedc.caltech.edu/station/weblist.php"
dat <- scan(url, what = "character", sep = "\n", skip = 7)
network <- substr(dat, start = 1, stop = 2)
sta.name <- substr(dat, start = 5, stop = 9)
sta.lat <- as.numeric(substr(dat, start = 52, stop = 59))
sta.lon <- as.numeric(substr(dat, start = 61, stop = 70))
sta.on <- as.numeric(substr(dat, start = 78, stop = 81))
sta.off <- as.numeric(substr(dat, start = 89, stop = 92))
stations <- data.frame(lon = sta.lon, lat = sta.lat, name = sta.name)
stations <- subset(stations, (network == "CI" & sta.off > min(seism$yr) & sta.on < max(seism$yr)))
stations <- subset(stations, (duplicated(name) == F))

# map the observed mc & predicted mc (quick & dirty)
mc.obs <- mc.geogr(seism, "mode", "grid", dbin = 0.1, n.bootstrap = 100)
prior <-  bmc.prior(mc.obs, stations)
mc.pred <- (prior[[1]]$c1 * prior[[2]]$d.kth ^ prior[[1]]$c2 + prior[[1]]$c3)
sigma.pred <- rep(prior[[1]]$sigma, nrow(mc.obs))
res <- bmc.bayes(mc.obs, mc.pred, sigma.pred)

#display the 6 BMC maps (mc.obs, mc.pred, mc.post, sigma.obs, sigma.pred, sigma.post)
image(matrix(res$mc.obs, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))
image(matrix(res$mc.pred, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))
image(matrix(res$mc.post, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))
image(matrix(res$sigma.obs, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))
image(matrix(res$sigma.pred, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))
image(matrix(res$sigma.post, nrow=length(unique(res$lon)), ncol=length(unique(res$lat))))

amignan/rseismNet documentation built on July 8, 2019, 6:53 p.m.