ggs_geweke: Dotplot of the Geweke diagnostic, the standard Z-score

Description Usage Arguments Value References Examples

View source: R/ggs_geweke.R

Description

Dotplot of Geweke diagnostic.

Usage

1
2
3
4
5
6
7
8
9
ggs_geweke(
  D,
  family = NA,
  frac1 = 0.1,
  frac2 = 0.5,
  shadow_limit = TRUE,
  greek = FALSE,
  plot = TRUE
)

Arguments

D

data frame whith the simulations.

family

Name of the family of parameters to plot, as given by a character vector or a regular expression. A family of parameters is considered to be any group of parameters with the same name but different numerical value between square brackets (as beta[1], beta[2], etc).

frac1

Numeric, proportion of the first part of the chains selected. Defaults to 0.1.

frac2

Numeric, proportion of the last part of the chains selected. Defaults to 0.5.

shadow_limit,

logical. When TRUE (the default), a shadowed area between -2 and +2 is drawn.

greek

Logical value indicating whether parameter labels have to be parsed to get Greek letters. Defaults to false.

plot

Logical value indicating whether the plot must be returned (the default) or a tidy dataframe with the results of the Geweke diagnostics per Parameter and Chain.

Value

A ggplot object, or a tidy data frame.

References

Fernández-i-Marín, Xavier (2016) ggmcmc: Analysis of MCMC Samples and Bayesian Inference. Journal of Statistical Software, 70(9), 1-20. doi:10.18637/jss.v070.i09

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

Examples

1
2

Example output

Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: tidyr
Loading required package: ggplot2

ggmcmc documentation built on Feb. 10, 2021, 5:10 p.m.