plotPost: Histogram of Posterior Distribution

Description Usage Arguments Value Examples

View source: R/plotPost.R

Description

This is a heavy modification of John Kruchke's function of the same name in the BEST package. This however makes many aesthetic changes and has some different features from the original function.

Usage

1
2
3
plotPost(fit = NULL, param = NULL, xlab = NULL, col = "blue",
  ROPE = NULL, cred.level = 0.9, method = "QI", CItextPlace = 0.7,
  breaks = "dhist", est = "mean", ...)

Arguments

fit

a stanfit or runjags object. You must specify which parameter you would like to plot. Alternatively, a vector containing the posterior distribution.

param

the name of the parameter in the stanfit or runjags object you want to plot.

xlab

if desired, a custom x-axis label. If supplying a fit object the label will be the parameter name, but you can override that. If paramSampleVec is supplied without a custom label here, the x-axis will display the Greek theta symbol by default.

col

the color scheme. One of "blue", "green" "red", or "purple".

ROPE

If you would like to display a ROPE, enter vector of three numbers, the first being the comparison value, the second being the lower limit of the ROPE and the third being the upper limit of the ROPE.

cred.level

The credibility level. Defaults to 90% (.90).

method

Quantile intervals "QI" (the default), or highest density intervals "HDI"

CItextPlace

Adjust the position of the credible interval text if needed.

breaks

a number, function name, or function.

est

One of "mean" (the default), "median", or "mode". The mode gives the value corresponding to the highest density of a kernel density estimate of the marginal posterior.

...

other arguments to hist()

Value

a histogram

Examples

1

abnormally-distributed/Bayezilla documentation built on Oct. 31, 2019, 1:57 a.m.