Performs key functions for MCMC analysis using minimal code - visualizes, manipulates, and summarizes MCMC output. Functions support simple and straightforward subsetting of model parameters within the calls, and produce presentable and 'publication-ready' output. MCMC output may be derived from Bayesian model output fit with JAGS, Stan, or other MCMC samplers.
MCMCplotwhen many parameters are plotted and large fig dimensions are used
MCMCplotwhen horiz = FALSE and large numbers of parameters are plotted
MCMCtracenow takes matrix input (as with the other functions). One chain is assumed when matrix input is used.
jags.parallelfunction in the
ISB = FALSE,
paramsargument now takes the form of regular expressions
MCMCtraceno longer open up external programs (pdf viewer) per CRAN policy
MCMCpstrfunction now added. Function returns summary output for a specified function while preserving structure of parameters (i.e., scalar, vector, matrix, array).
MCMCtracenow takes a
priorsargument to visualize prior/posterior overlap. If specified, the prior (user specified as this information is not contained within the MCMC output) for a specified parameter is plotted on the same plot as the posterior output. Percent overlap between posterior and prior is also calculated and displayed.
MCMCchainsthat caused incorrect alphabetization of parameter names when output from R2jags was used.
MCMCsummarygreatly speed up calculation of Rhat values for objects with large numbers of parameters
MCMCchainsnow takes the argument
mcmc.list. If specified,
mcmc.listobject returned rather than a matrix.
MCMCsummarythat displayed the same result twice when selecting only a single output parameter of interest
MCMCplotthat displayed the axis label too close to tick labels when
horiz = FALSEand tick labels were very long
MCMCsummaryRhat values always round to 2 digits
funcargument rounded to specified digits for rest of output
MCMCsummarynow takes a
func_nameargument. If specified, column displaying output from
funcwill be labeled with this name. If not specified, column will be labeled 'func'.
ISB(Ignore Square Bracket) has now been added. By default
ISB = TRUE-
exclmatch exactly to parameter names by default (ignoring square brackets). When
ISB = FALSE, square brackets will not be ignored, and will match on partial names (as when using
grep). This applies to all functions.
MCMCsummarynow takes a
funcargument. If a function is specified, it will be evaluated for all specified parameters and specified in the
MCMCsummaryspeed greatly increased. Parameters of interest are now sorted before calculations are made. Rhat values are no longer masked, but rather not calculated when
Rhat = FALSE. These changes result in dramatic speed ups for large objects.
MCMCsummarybug fixed that caused function to fail when only one chain was run
MCMCsummarystandard deviation added to summary output for each parameter.
MCMCsummarynumber of effective samples added to summary output for each parameter. Default is
n.eff = FALSE(metric will not be calculated or displayed).
MCMCtracedefault is now to write trace plots to pdf. Default number of iterations changed to 5000 from 2000.
MCMCploty-axis labels now vertical when
horiz = FALSEto improve readability.
MCMCplotbug that resulted in poor plot dimension choices in some circumstances now fixed.
MCMC_datanow contains three chains with 6000 iterations each.
jags.samplesfunction in the
coda.samplesshould be used instead.
MCMCplotwhich incorrectly shaded parameter estimates when plotted vertically
MCMCsummarynow displays estimates for deviance with MCMC output fits with R2jags
MCMCsummaryto do with Cholesky decomposition and calculating Rhat.
MCMCsummaryfor certain object types.
MCMCplotlabels now start at top and go down (more intuitive).
MCMCtracenow plots only the last 2000 iterations of the posterior chains by default. The argument is now number of iterations to be plotted, rather than the starting iteration to plot. As such,
iter_st(start iteration) changed to
iter(number of iterations from end).
MCMCplot- caterpillar plots can now be plotted to run vertically rather than horizontally. Parameters are plotted left to right when plotted vertically.
MCMCplot- axes lines only goes to the end of ticks now.