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

plotHDI

Plots highest density interval (HDI) from (MCMC) samples and prints HDI in the R console. HDI is indicated by a red line. Based on John Kruschke's codes.


Description

Plots highest density interval (HDI) from (MCMC) samples and prints HDI in the R console. HDI is indicated by a red line. Based on John Kruschke's codes.

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


hBayesDM

Hierarchical Bayesian Modeling of Decision-Making Tasks

v1.1.1
GPL-3
Authors
Woo-Young Ahn [aut, cre], Nate Haines [aut], Lei Zhang [aut], Harhim Park [ctb], Jaeyeong Yang [ctb], Jethro Lee [ctb]
Initial release
2021-05-04

We don't support your browser anymore

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