BASiCS_DiagHist: Create diagnostic plots of MCMC parameters

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/BASiCS_DiagHist.R

Description

Plot a histogram of effective sample size or Geweke's diagnostic z-statistic. See effectiveSize and geweke.diag for more details.

Usage

1
2
3
4
5
6
7
8
BASiCS_DiagHist(
  object,
  Parameter = NULL,
  Measure = c("ess", "geweke.diag"),
  na.rm = TRUE
)

BASiCS_diagHist(...)

Arguments

object

an object of class BASiCS_Summary

Parameter

Optional name of a chain parameter to restrict the histogram; if not supplied, all parameters will be assessed. Possible values: 'mu', 'delta', 'phi', 's', 'nu', 'theta', 'beta', 'sigma2' and 'epsilon'. Default Parameter = NULL.

Measure

Character scalar specifying the diagnostic measure to plot. Current options are effective sample size and the Geweke diagnostic criterion.

na.rm

Logical value indicating whether NA values should be removed before calculating effective sample size.

...

Unused.

Value

A ggplot object.

Author(s)

Alan O'Callaghan

References

Geweke, J. Evaluating the accuracy of sampling-based approaches to calculating posterior moments. In _Bayesian Statistics 4_ (ed JM Bernado, JO Berger, AP Dawid and AFM Smith). Clarendon Press, Oxford, UK.

See Also

BASiCS_Chain

Examples

1
2
3
4
5
6
7
# Built-in example chain
data(ChainSC)

# See effective sample size distribution across all parameters
BASiCS_DiagHist(ChainSC)
# For mu only
BASiCS_DiagHist(ChainSC, Parameter = "mu")

BASiCS documentation built on April 16, 2021, 6 p.m.