Learn R Programming

hBayesDM (version 0.4.0)

plotHDI: Plots highest density interval (HDI) from (MCMC) samples and prints HDI in the R console. HDI is indicated by a red line.

Description

Based on John Kruschke's codes http://www.indiana.edu/~kruschke/DoingBayesianDataAnalysis/

Usage

plotHDI(sample = NULL, credMass = 0.95, Title = NULL, xLab = "Value",
  yLab = "Density", fontSize = NULL, binSize = 30, ...)

Arguments

sample
MCMC samples
credMass
A scalar between 0 and 1, indicating the mass within the credible interval that is to be estimated.
Title
Character value containing the main title for the plot
xLab
Character value containing the x label
yLab
Character value containing the y label
fontSize
Integer value specifying the font size to be used for the plot labels
binSize
Integer value specifyin ghow wide the bars on the histogram should be. Defaults to 30.
...
Arguments that can be additionally supplied to geom_histogram

Value

A vector containing the limits of the HDI