Learn R Programming

noncomplyR (version 1.0)

summarize_chain: Posterior Inference based on a Sample from the Posterior

Description

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

Usage

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

Run this code
# NOT RUN {
# Suppose the posterior distribution was Normal(15, 5)
posterior_chain <- rnorm(100, 15, 5); summarize_chain(posterior_chain)

# }

Run the code above in your browser using DataLab