Calculate an SCB from a samples matrix, which minimizes the absolute distances of the contained samples to a mode vector, at each gridpoint. Therefore the SCB might be considered an “HPD SCB”.
scrHpd(samples, mode = apply(samples, 1, median), level = 0.95)
m by n matrix where m is the number of parameters,
n is the number of samples and hence each (multivariate) sample is a column in
the matrix samples
mode vector of length m (defaults to the vector of medians)
credible level for the SCB (default: 0.95)
A matrix with columns “lower” and “upper”, with the lower and upper SCB bounds, respectively.
Besag, J.; Green, P.; Higdon, D. \& Mengersen, K. (1995): “Bayesian computation and stochastic systems (with discussion)”, Statistical Science, 10, 3-66.