ggmcmc {ggmcmc}R Documentation

Wrapper function that creates a single pdf file with all plots that ggmcmc can produce.

Description

ggmcmc() is simply a wrapper function that generates a pdf file with all the potential plots that the package can produce.

ggmcmc is a tool for assessing and diagnosing convergence of Markov Chain Monte Carlo simulations, as well as for graphically display results from full MCMC analysis. The package also facilitates the graphical interpretation of models by providing flexible functions to plot the results against observed variables.

Usage

ggmcmc(
  D,
  file = "ggmcmc-output.pdf",
  family = NA,
  plot = NULL,
  param_page = 5,
  width = 7,
  height = 10,
  simplify_traceplot = NULL,
  dev_type_html = "png",
  ...
)

Arguments

D

Data frame whith the simulations, previously arranged using ggs

file

Character vector with the name of the file to create. Defaults to "ggmcmc-output.pdf". When NULL, no pdf device is opened or closed. This allows the user to work with an opened pdf (or other) device. When the file has an html file extension the output is an Rmarkdown report with the figures embedded in the html file.

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).

plot

character vector containing the names of the desired plots. By default (NULL), ggmcmc() plots ggs_histogram(), ggs_density(), ggs_traceplot(), ggs_running(), ggs_compare_partial(), ggs_autocorrelation(), ggs_crosscorrelation(), ggs_Rhat(), ggs_grb(), ggs_effective(), ggs_geweke() and ggs_caterpillar().

param_page

Numerical, number of parameters to plot for each page. Defaults to 5.

width

Width of the pdf display, in inches. Defaults to 7.

height

Height of the pdf display, in inches. Defaults to 10.

simplify_traceplot

Numerical. A percentage of iterations to keep in the time series. It is an option intended only for the purpose of saving time and resources when doing traceplots. It is not a thin operation, because it is not regular. It must be used with care.

dev_type_html

Character. Character vector indicating the type of graphical device for the html output. By default, png. See RMarkdown.

...

Other options passed to the pdf device.

Details

Notice that caterpillar plots are only created when there are multiple parameters within the same family. A family of parameters is considered to be all parameters that have the same name (usually the same greek letter) but different number within square brackets (such as alpha[1], alpha[2], ...).

References

http://xavier-fim.net/packages/ggmcmc/.

Examples

## Not run: 
data(linear)
ggmcmc(ggs(s))  # Directly from a coda object

## End(Not run)

[Package ggmcmc version 1.5.1.1 Index]