CredibleInterval {RChronoModel}R Documentation

Bayesian credible interval

Description

Computes the shortest credible interval at the desired level.

Usage

CredibleInterval(a_chain, level = 0.95)

Arguments

a_chain

numeric vector containing the output of the MCMC algorithm for a one-parameter

level

probability corresponding to the level of confidence used for the credible interval

Details

A (100 * level) % credible intervalgives the shortest interval, whose posterior probability is equal to the desired level. This interval is approximated by constructing the shortest interval such that N*(1-level) elements of the sample are outside the interval.

Value

Returns a vector of values containing the level of confidence and the endpoints of the shortest credible interval.

Author(s)

Anne Philippe <Anne.Philippe@univ-nantes.fr> and

Marie-Anne Vibet <Marie-Anne.Vibet@univ-nantes.fr>

Examples

  data(Events); attach(Events)

  CredibleInterval(Event.1)
  CredibleInterval(Event.12, 0.50)

[Package RChronoModel version 0.4 Index]