Return a function that computes the posterior intervals.

posterior_intervals(...)

Arguments

...

Arguments to be passed to quantile.

Value

A scalar with same type as `x`.

Examples

f <- posterior_intervals(probs = c(0.05, 0.95)) print(f(1:100))
#> 5% 95% #> 5.95 95.05