facetPost: Plot Multiple Posterior Distributions

Description Usage Arguments Details Value Examples

View source: R/facetPost.R

Description

This lets you plot several different posterior histograms at once in a faceted plot. The number of columns, rows, and several other features can be customized. It is also easy to drop or keep certain parameters so you can view only the ones of interest.

Usage

1
2
3
facetPost(fit, keeppars = NULL, droppars = c("ySim", "log_lik",
  "lp__"), col = "blue", nrow = 4, ncol = 2, breaks = "dhist",
  method = "QI", est = "mean", cred.level = 0.9)

Arguments

fit

a stanfit or runjags object. This can be used as an alternative to paramSampleVec, but you must specify which parameter you would like to plot. If using this argument be sure to type fit = "yourmodel" so that the function knows it is not intended to be a vector.

keeppars

variables to keep

droppars

variables to drop. Defaults to c("ySim", "log_lik", "lp__")

col

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

nrow

number of rows in the layout

ncol

number of columns in the layout

breaks

a number, function name, or function.

method

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

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.

cred.level

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

comparison

value, the second being the lower limit of the ROPE and the third being the upper limit of the ROPE.

Details

An example of output:

Value

A plot

Examples

1

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