interval_credible | R Documentation |
Computes the shortest credible interval of the output of the MCMC algorithm for a single parameter.
interval_credible(x, ...)
## S4 method for signature 'MCMC'
interval_credible(
x,
level = 0.95,
calendar = getOption("ArchaeoPhases.calendar")
)
x |
An |
... |
Currently not used. |
level |
A length-one |
calendar |
A |
A (100 \times level)
% credible interval is an interval
that keeps N \times (1 - level)
elements of the
sample outside the interval.
The (100 \times level)
% credible interval is the
shortest of all those intervals.
For instance, the 95% credible interval is the central portion of the posterior distribution that contains 95% of the values.
Returns a list
of numeric
matrix
.
A. Philippe, M.-A. Vibet, T. S. Dye, N. Frerebeau
arkhe::interval_credible()
Other statistics:
interval_hdr()
,
sensitivity()
,
summary()
## Coerce to events
eve <- as_events(mcmc_events, calendar = CE(), iteration = 1)
eve <- eve[1:10000, ]
## Rata die
interval_credible(eve, level = 0.95) # Credible interval
interval_hdr(eve, level = 0.68) # HPD interval
## BP
interval_credible(eve, level = 0.95, calendar = BP()) # Credible interval
interval_hdr(eve, level = 0.95, calendar = BP()) # HPD interval
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.