interval_hdr {ArchaeoPhases}R Documentation

Bayesian HPD Regions

Description

Bayesian HPD Regions

Usage

interval_hdr(x, y, ...)

## S4 method for signature 'MCMC,missing'
interval_hdr(
  x,
  level = 0.95,
  calendar = getOption("ArchaeoPhases.calendar"),
  ...
)

Arguments

x

An MCMC object containing the output of the MCMC algorithm.

y

Currently not used.

...

Extra arguments to be passed to stats::density().

level

A length-one numeric vector giving the confidence level.

calendar

A TimeScale object specifying the target calendar (see calendar()).

Value

Returns a list of numeric matrix.

Author(s)

A. Philippe, M.-A. Vibet, T. S. Dye, N. Frerebeau

References

Hyndman, R. J. (1996). Computing and graphing highest density regions. American Statistician, 50: 120-126. doi:10.2307/2684423.

See Also

stats::density(), arkhe::interval_hdr()

Other statistics: interval_credible(), 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

[Package ArchaeoPhases version 2.0 Index]