Description Usage Arguments Details Value Author(s) Examples
Computes the shortest credible interval at the desired level.
1 | CredibleInterval(a_chain, level = 0.95)
|
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 |
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.
Returns a vector of values containing the level of confidence and the endpoints of the shortest credible interval.
Anne Philippe <Anne.Philippe@univ-nantes.fr> and
Marie-Anne Vibet <Marie-Anne.Vibet@univ-nantes.fr>
1 2 3 4 | data(Events); attach(Events)
CredibleInterval(Event.1)
CredibleInterval(Event.12, 0.50)
|
level CredibleIntervalInf CredibleIntervalSup
0.95 -1981.05 -1610.60
level CredibleIntervalInf CredibleIntervalSup
0.50 -1291.70 -1184.26
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.