extract_ci: Extract confidence intervals from a vector of samples

Description Usage Arguments Value Examples

Description

Extract confidence intervals from a vector of samples

Usage

1
extract_ci(x, CI_level = seq(0.1, 0.9, 0.1), type = c("eti", "hdi"))

Arguments

x

Vector of samples from a distribution.

CI_level

Vector containing the level of the confidence/credible intervals.

type

"eti" for equal-tailed intervals and "hdi" for highest density intervals.

Value

Dataframe with columns: Lower, Upper, Level.

Examples

1
2
3
x <- rexp(1e4)
extract_ci(x, type = "eti")
extract_ci(x, type = "hdi")

HuraultMisc documentation built on Sept. 6, 2021, 9:09 a.m.