smryMCMC: Summarize the posterior distribution

View source: R/summary.R

smryMCMCR Documentation

Summarize the posterior distribution

Description

Summarize the posterior distribution for HapBias, kappa and other parameters. The posterior distributs will be saved into a pdf file under current folder.

Usage

smryMCMC(codaSamples, indiffZone = c(0.49, 0.51), credMass = 0.95,
  usexlim = FALSE, xlimLow = 0.4, xlimHigh = 0.6, saveCSV = TRUE,
  saveName = "HieraraBayesian")

Arguments

codaSamples

output from BernHierModel

indiffZone

limits of indiffZone

credMass

probility mass for highest density interval (HDI)

usexlim

manually set the xlim of histogram?

xlimLow

low end of xlim

xlimHigh

high end of xlim

saveCSV

save the results as a csv file?

saveName

prefix for the saved pdf file and csv file

Value

put the histograms from the posterior distributions into a pdf file and return a data.frame contain the summary info

Note

Scripts have been modified from "Doing Bayesian Data Analysis (2nd)" by John K. Kruschke.

Examples

byesRes.A <- BernHierModel(F1.TypeA[, -1], saveName = "Family1.TypeA")
summaryRes.A <- smryMCMC(byesRes.A, saveName = "Family1.TypeA")

ccshao/maIHB documentation built on July 9, 2022, 3:48 p.m.