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.
ggmcmc(
D,
file = "ggmcmc-output.pdf",
family = NA,
plot = NULL,
param_page = 5,
width = 7,
height = 10,
simplify_traceplot = NULL,
dev_type_html = "png",
...
)
Data frame whith the simulations, previously arranged using ggs
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.
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).
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()
.
Numerical, number of parameters to plot for each page. Defaults to 5.
Width of the pdf display, in inches. Defaults to 7.
Height of the pdf display, in inches. Defaults to 10.
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.
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.
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], ...).
# NOT RUN {
data(linear)
ggmcmc(ggs(s)) # Directly from a coda object
# }
Run the code above in your browser using DataLab