Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ci

Calculate Credible Intervals (wide and narrow).


Description

Generate a data frame with the limits of two credible intervals. Function used by ggs_caterpillar. "low" and "high" refer to the wide interval, whereas "Low" and "High" refer to the narrow interval. "median" is self-explanatory and is used to draw a dot in caterpillar plots. The data frame generated is of wide format, suitable for ggplot2::geom_segment().

Usage

ci(D, thick_ci = c(0.05, 0.95), thin_ci = c(0.025, 0.975))

Arguments

D

Data frame whith the simulations.

thick_ci

Vector of length 2 with the quantiles of the thick band for the credible interval

thin_ci

Vector of length 2 with the quantiles of the thin band for the credible interval

Value

A data frame tibble with the Parameter names and 5 variables with the limits of the credibal intervals (thin and thick), ready to be used to produce caterpillar plots.

Examples

data(linear)
ci(ggs(s))

ggmcmc

Tools for Analyzing MCMC Simulations from Bayesian Inference

v1.5.1.1
GPL-2
Authors
Xavier Fernández i Marín [aut, cre] (<https://orcid.org/0000-0002-9522-8870>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.