interval_credible {ArchaeoPhases} | R Documentation |
Bayesian Credible Interval
Description
Computes the shortest credible interval of the output of the MCMC algorithm for a single parameter.
Usage
interval_credible(x, ...)
## S4 method for signature 'MCMC'
interval_credible(
x,
level = 0.95,
calendar = getOption("ArchaeoPhases.calendar")
)
Arguments
x |
An |
... |
Currently not used. |
level |
A length-one |
calendar |
A |
Details
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.
Value
Returns a list
of numeric
matrix
.
Author(s)
A. Philippe, M.-A. Vibet, T. S. Dye, N. Frerebeau
See Also
Other statistics:
interval_hdr()
,
sensitivity()
,
summary()
Examples
## 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