Questions tagged [credible-interval]

Credible intervals are an interval within which an unobserved parameter value falls with a particular probability. They are an important concept in Bayesian statistics.

The purpose of credible intervals is to describe and summarise the uncertainty of statistical parameters.

A common way to sharpen the understanding of credibility is the comparison with the term "confidence".

Credibility vs Confidence

Credible intervals can be confused with confidence intervals. However, while their goal is similar, their statistical definition annd meaning is very different. Confidence is rooted in Bayesian inference and is obtained through a complex algorithm full of rarely-tested assumptions and approximations, credibility is fairly straightforward to compute. Credibility means that there is 95% likelihood that a population parameter lies in the designated interval. Many times this interpretation is falsly attributed to confidence (see e.g. Hoekstra, 2014). Confidence, however, works differently: "If we repeat the experiment infinitely many times, 95% of the experiments will capture the population parameter in their confidence intervals."

Finally, the typical interval level for confidence is 95%. While this was the first choice for credibility for some time several authors started to question this and suggested a default credibility of roughly 90% (Kruschke, 2014; McElreath, 2014, 2018).

References

  • Hoekstra, R., Morey, R. D., Rouder, J. N., & Wagenmakers, E. J. (2014). Robust misinterpretation of confidence intervals. Psychonomic Bulletin & Review, 21(5), 1157-1164.
  • Kruschke, J. (2014). Doing bayesian data analysis: A tutorial with r, jags, and stan. Academic Press.
  • McElreath, R. (2018). Statistical rethinking: A bayesian course with examples in r and stan. Chapman; Hall/CRC.
20 questions
10
votes
3 answers

Function parameter as argument in an R function

I am attempting to write a general function to calculate coverage probabilities for interval estimation of Binomial proportions in R. I intend to do this for a variety of confidence interval methods e.g. Wald, Clopper-Pearson, HPD intervals for…
jatotterdell
  • 109
  • 1
  • 1
  • 8
3
votes
1 answer

ggplot specify position of vertical segments for categorical x r

I am plotting row data and I added a segment of the credible intervals and a black point for the fitted values statistically calculated. My problem is that I would like to have these lines (and the black point) slightly moved (horizontally) respect…
have fun
  • 381
  • 5
  • 17
2
votes
1 answer

Analytic Highest Density Interval in Python (preferably for Beta distributions)

I was wondering if anybody knows of a reliable and fast analytic HDI calculation, preferably for beta functions. The definition of the HDI is in this question called "Highest Posterior Density Region". I am looking for a function that has the…
elzurdo
  • 579
  • 1
  • 4
  • 14
2
votes
1 answer

Plotting both 50% quantile and credible interval from package 'mcp' output in R

I'm trying to plot both the 95% credible intervals and the line for the 50% median on the same graph using output from the "mcp" package in R. I used the mcp package to model different residual scales (i.e., quasi emulate) for three segments with…
2
votes
2 answers

Extracting posterior modes and credible intervals from glmmTMB output

I normally work with lme4 package, but the glmmTMB package is increasingly becoming better suited to work with highly complicated data (think overdispersion and/or zero-inflation). Is there a way to extract posterior modes and credible intervals…
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
2
votes
1 answer

Extract posterior estimate and credible intervals for random effect for lme4 model in R

I need to extract the posterior estimates and intervals for a random effect from my model. For illustrative purposes, a similar dataset to the one I am using would be the ChickWeight dataset in base R. The way I extract the posterior estimates and…
Blundering Ecologist
  • 1,199
  • 2
  • 14
  • 38
2
votes
1 answer

Highest Density Interval (HDI) for Posterior Distribution Pystan

I am seeing that in Pystan, an HDI function can be used to provide a 95% credible interval surrounding the posterior distribution. However, they say it will only work for unimodal distributions. If my model may have a multimodal distribution (up to…
nik jacks
  • 75
  • 1
  • 5
2
votes
2 answers

Bayesian interval of 5 fitted values

I conducted a Bayesian analysis by running Winbugs from R and derived the fitted values and their Bayesian intervals. Here is the related Winbugs output where mu[i] is the i-th fitted value. node mean 2.5% 97.5% mu[1] 0.7699 0.6661 …
Günal
  • 751
  • 1
  • 14
  • 29
1
vote
1 answer

How to find and plot different credible intervals?

If i use the data from 'discoveries', how can i find for example 80%, 90% and 95% credible interval and plot them in a confidence curve? By using summary(discoveries) i have that mean a = 3.1, sample size n = 310 and standard deviation s =2.5 can I…
Mokoisa
  • 75
  • 1
  • 4
1
vote
1 answer

Gaussian Process Confidence vs Credible Intervals

Since Gaussian Process returns a distribution and not a point estimate, why this example (and actually in every example with GP) talk about Confidence Intervals on the analogues for Bayesian statistics the Credible Intervals?
1
vote
0 answers

Error propagation in a Bayesian analysis of a Markov chain

I'm analysing longitudinal panel data, in which individuals transition between different states in a Markov chain. I'm modelling the transition rates between states using a series of multinomial logistic regressions. This means that I end up with a…
1
vote
0 answers

Multivariate HPD Interval in R

Coda, and other R packages, allow to calculate HPD intervals for multiple posterior chains. However, the HPD intervals are always calculated marginally per chain. Is there a way in R to find the joint HPD interval, taking into account the…
PerrySun
  • 187
  • 1
  • 1
  • 8
1
vote
3 answers

Using optimize() to find the shortest interval that takes 95% area under a curve in R

Background: I have a curve whose Y-values are produced by my small R function below (neatly annotated). If you run my entire R code, you see my curve (but remember, it's a function so if I changed the argument values, I could get a different…
rnorouzian
  • 7,397
  • 5
  • 27
  • 72
0
votes
0 answers

reorder community order using multiSpeciesTP, siberdensityplot

I am trying to reorder the populations on a credibilityIntervals plot under the packages tRophicPosition. I have made the trophic position plot successfully but would like to reorder the communties produced to be smallest to largest. I dont know why…
0
votes
3 answers

Calculate 95 % credible interval for multiple columns in data frame R

I need to get/calculate the 95 % credible interval for my data. My data consists of ten columns and over 5000 rows. Here is some example data. data <- data.frame(A = c(-7.595932, -6.451768, -4.682111, -8.781488, -4.251690), B =…
1
2