xtr_ci_eti: Equal-Tailed Interval

View source: R/ci_eti.R

xtr_ci_etiR Documentation

Equal-Tailed Interval

Description

Calculates Bayesian credible intervals using the equal-tailed interval (ETI), i.e., the CI such that the left and right tails outside the CI have the same coverage.

Usage

xtr_ci_eti(x, level = 0.95, ..., na_rm = FALSE)

Arguments

x

A numeric vector of MCMC samples.

level

A number > 0 and <= 1 specifying the probability coverage of the interval.

...

Currently unused.

na_rm

A flag indicating whether to remove missing values.

Details

The interval is guaranteed to be two-sided, unlike ⁠[xtr_ci_hdi()]⁠. Does not return integer outputs even if the input data are integers, unlike xtr_ci_hdi(). The interval limits are always real (double) numeric values.

Value

A data.frame of the lower and upper limits for the credible interval.

See Also

xtr_ci() and xtr_ci_hdi()

Examples

xtr_ci_eti(rnorm(1e4))

extras documentation built on July 16, 2026, 1:07 a.m.