InverseHDI: Compute Inverse HDI

Description Usage Arguments Details Value See Also Examples

View source: R/mcmc_misc.R

Description

Compute inverse cumulative density function of the distribution

Usage

1
2
3
4
5
6
7
InverseHDI(
  beta,
  shape1,
  shape2,
  credible.region = 0.95,
  tolerance = 0.00000001
)

Arguments

beta

density, distribution function, quantile function and random generation for the Beta distribution with parameters shape1 and shape2

shape1

non-negative parameter of the Beta distribution.

shape2

non-negative parameter of the Beta distribution.

credible.region

summarize uncertainty by defining a region of most credible values (e.g., 95 percent of the distribution), Default: 0.95

tolerance

the desired accuracy, Default: 1e-8

Details

values within the HDI have higher probability density than values outside the HDI, and the values inside the HDI have a total probability equal to the credible region (e.g., 95 percent).

Value

Return HDI

See Also

Beta,optimize

Examples

1
2
3
InverseHDI( qbeta , 554 , 149 )
# HDIlo HDIhi
# 0.758 0.818

bfw documentation built on Jan. 11, 2020, 9:29 a.m.