summarize_chain: Posterior Inference based on a Sample from the Posterior

Description Usage Arguments Value Examples

View source: R/data_aug_functions.R

Description

summarize_chain provides posterior summaries based off a sample from the posterior distribution.

Usage

1
summarize_chain(chain, digits = 3)

Arguments

chain

a numeric vector containing the samples from the posterior distribution.

digits

the number of decimal places

Value

a list containing the posterior mean, median, and quantile-based credible intervals calculated from the values in the chain.

Examples

1
2
# Suppose the posterior distribution was Normal(15, 5)
posterior_chain <- rnorm(100, 15, 5); summarize_chain(posterior_chain)

noncomplyR documentation built on May 2, 2019, 6:01 a.m.