MCMCdiag
now accepts other arguments fromMCMCsummary
to summarize and save out a subset of parameters, for exampleprobs
andpg0
MCMCdiag
now acceptsparams
,excl
,ISB
, andexact
arguments to summarize and save out a subset of parameters (useful for model runs with many params where object may exceed memory limit)
MCMCdiag
fix spacing issue for min neff in summary file forcmdstanr
objectsMCMCdiag
change behavior so that if specifieddir
does exist, save to working dirMCMCdiag
ifmkdir
name exists, append '_1' to filename and create
- Fix CRAN documentation issue
- Fix bug in
MCMCsummary
that preventedn.eff
from being displayed forjagsUI
objects
- All functions now accept model objects fit with
cmdstanr
package - Add Table of Contents to vignette
MCMCplot
fix bug associated withref_ovl = TRUE
and the specification of multiple objects. Function also now automatically lightens colors specified (instead of defaulting to gray) whenref_ovl = TRUE
MCMCsummary
fix bug associated withpg0 = TRUE
when input was derived from Stan
MCMCsummary
now takes argumentpg0
. Whenpg0 = TRUE
the proportion of the posterior that is greater than 0 is returned as a columnMCMCdiag
now takes any argument fromMCMCsummary
to modify printed summary output- Clean up documentation
MCMCdiag
add more descriptive message about output fromnimble
objectsMCMCtrace
fix rdev matrix warning
MCMCplot
fix bug that prevented plotting with a single parameter
MCMCdiag
function added to create .txt file summarizing model inputs and outputs and save model object as .rds file- All functions now take
exact
as an argument to parse desired parameter.ISB = TRUE
no longer uses regex matching (exact
should be used to specify this). - Add support for objects output from the
nimble
package MCMCpstr
fix bug where the incorrect number of dimensions would be returned when subsetting a param with >1 dimMCMCplot
now takes the argumentci
which can be used to specify the credible interval displayed in the caterpillar plotMCMCplot
now takes the argumentHPD
which can be used to specify whether highest posterior density intervals or equal-tailed intervals should be displayed in the caterpillar plot
MCMCplot
fix bug where error would result when trying to plot a single parameter
MCMCplot
can now plot models that have NA for posterior estimates. Useful when plotting two models side-by-side is desired and one model has parameters that the other does not (use MCMCchains to create matrix of draws, add NA-filled cols with missing parameter names, and plot)
MCMCtrace
fix undesired behavior whenpost_zm
is specified asFALSE
MCMCsummary
for model objects fit withjagsUI
, the function now returns Rhat and n.eff values that coincide with values calculated in that package (e.g., split-chain Rhat), rather than calculating these with thecoda
package. These values are fed intoMCMCtrace
whenRhat
and/orn.eff
are specified asTRUE
.MCMCsummary
fix bug where an error was returned whenfunc_name
was not specified
MCMCtrace
now accepts expression input (for Greek characters etc.) from R formain_den
andmain_tr
args
- All functions now avoid using function
class
(and useis
instead) asmatrix
objects will also bearray
as of R 4.0.0
MCMCtrace
no longer changes working dir whenwd
is specified - just puts pdf there
MCMCpstr
fix bug where dimensions were not displayed properly for Stan modelsMCMCpstr
fix warning with objects derived fromrstanarm
andbrms
MCMCsummary
change variable names to reflect what is displayed bybrms
package (rather than raw Stan output)
MCMCsummary
fix bug thrown when one only one chain run for Stan modelsMCMCsummary
fix Rhat label issue (from r_hat to Rhat)
MCMCsummary
fix bug that caused stanfit parameter names to be numbers
MCMCsummary
now takesquantiles
as an argument, allowing user to specify which quantiles to returnMCMCsummary
now takesHPD
as an argument to calculate highest posterior density intervalsMCMCsummary
now outputs as a data.frame rather than a matrixMCMCchains
fix bug that output different parameters names forstanreg
andbrms
objectsMCMCplot
fix bug that caused guidelines to plot over appropriate bounds
MCMCplot
now hasobject2
,col2
, andoffset
arguments. Allows user to plot output from two separate models, as long as both model outputs have identical parameter names.
MCMCplot
now hasguide_lines
argument, to plot lines to help reference which posterior corresponds to each parameter name- Remove deprecated arguments
- Add support for objects output from
rstanarm
andbrms
packages MCMCplot
add support for plotting multiple colors on the same plot
MCMCsummary
forn.eff
the default is nowTRUE
(displays number of effective samples by default)MCMCtrace
now has the optionplot
. WhenFALSE
no plot is output. Used in conjunction withPPO_out = TRUE
to to calculate PPO without plotting trace plots.
MCMCsummary
fix bug where Stan input was not being sorted by parameter index
MCMCtrace
fix spacing issue for Rhat and n.eff text whenRhat = TRUE
andn.eff = TRUE
MCMCplot
add deprecation warnings for arguments
MCMCsummary
forstanfit
objects (model output derived from Stan) Rhat and n_eff are calculated using therstan
package. Note thatrstan
calculates Rhat and n_eff values slightly differently (more conservatively) than thecoda
package (commonly used to summarize model output derived from JAGS).MCMCplot
the following argument names have been changed: orig:labels_sz
, new:sz_labels
orig:med_sz
, new:sz_med
orig:thick_sz
, new:sz_thick
orig:thin_sz
, new:sz_thin
orig:axis_text_sz
, new:sz_ax_txt
orig:ax_sz
, new:sz_ax
orig:tick_text_sz
, new:sz_tick_txt
orig:main_text_sz
, new:sz_main_txt
orig:tick_pos
, new:pos_tick
MCMCtrace
add ability to specify xlim and ylim for density plotsMCMCtrace
add ability to specify xlab and ylab for density and trace plotsMCMCtrace
add ability to specify title for trace and density plotMCMCtrace
add ability to specify line width and line type for density and prior lines on density plotsMCMCtrace
add ability to specify color for density and priors lines on density plotsMCMCtrace
add ability to specify size and color of text when priors specified, and the position of ticks for density and trace plotsMCMCtrace
add ability to specify size of tick labels, axes labels, and thickness of axesMCMCtrace
clean up plotting of trace plots when only two plots are plotted in windowMCMCtrace
add ability to include Rhat and number of effective samples on trace plots
MCMCchains
fix error associated with coda::mcmc andrjags
objects
MCMCplot
now takesguide_axis
argument. IfTRUE
, a second axis (x-axis ifHORIZ = TRUE
, y-axis ifHORIZ = FALSE
) is plotted to help interpret values on plot.
MCMCchains
now assigns arbitrary names to columns (parameters) when input type is matrix (along with a warning that it is doing so)MCMCtrace
now modifies the layout of trace plots when < 6 plots are generatedMCMCpstr
fix bug that prevented scalars when type = 'chains'
MCMCsummary
digits
argument is now NULL by default (all computed digits are returned upon default - any rounding must be explicitly specified)MCMCsummary
digits
argument usessignif
rather thanround
for rounding (in other words,digits
specifies number of significant digits rather than number of decimal places)MCMCsummary
now takesround
argument to round output to specified number of decimal placesMCMCpstr
no longer has the option to restrict the number of digits output (returns all digits)MCMCpstr
now takestype
as an argument. Whentype = 'summary'
(default), values calculated with thefunc
argument (defaultmean
) are returned. Whentype = 'chains'
, posterior chains are returned while preserving the parameter structure. Posterior samples are stored in the last dimension of the array for each element of the output list. In this way vector parameters are output in matrix format, matrix parameters are output in three dimension array format (within each element of the output list - one parameter for each list element).MCMCpstr
now accepts output greater than length 1 from argumentfunc
. If output is greater than length 1, function output are stored in the last dimension of the array (within each element of the output list - one parameter for each list element).
MCMCchains
now takeschain_num
as an argument. When specified, single posterior chains can be output for a particular parameter of interest. Useful for determining the last value in an MCMC chain for each parameter (to be used as initial values for a subsequent model run).
- All functions now return a warning for missing params in
excl
andparams
arguments instead of an error. This means that output will be returned even when values specified do not exist. Change was made toMCMCchains
code but impacts all functions. - Fix typos
- Add contributors Che-Castaldo and Hardy
MCMCtrace
now takespost_zm
as an argument. Whenpost_zm = FALSE
, x- and y-limits of density plots are scaled so that both the prior and posterior can be visualized on a plot (rather than zoomed on the posterior).
MCMCpstr
fix bug to institute rounding when parameters as scalars or vectorsMCMCtrace
now takesPPO_out
as an argument. WhenPPO_out = TRUE
, the percent overlap between prior and posterior for each paras will be returned as a data.frame.- Add CITATION file
- Fix warning when feeding jags.parallel object to
MCMCsummary
- Fix bug that produced an error when using
stanfit
objects - Add automated tests to check package functions
MCMCtrace
now takesopen_pdf
as an argument. Whenopen_pdf = FALSE
, the generated pdf will not be opened in a viewer automatically.MCMCtrace
now takesgvals
as an argument. When simulated data are used to fit a model, the generating values used to simulate the data (true parameter values) will be plotted as vertical lines on the density plots.MCMCplot
ref_ovl
argument now defaults to FALSE (one color is plotting for all parameter estimates)- Change
MCMC_data
(example data) so that it's smaller (only 5k iterations and two parameters)
- Fix white space issue in
MCMCplot
when many parameters are plotted and large fig dimensions are used - Fix label alignment issue in
MCMCplot
whenhoriz = FALSE
and large numbers of parameters are plotted
- Fix bug that prevented parameters from being sorted when using matrix input for
MCMCtrace
- Add support for objects produced with the jagsUI package
MCMCtrace
now takes matrix input (as with the other functions). One chain is assumed when matrix input is used.
- Fix bug that produced errors when using the
jags.parallel
function in theR2jags
package. - All functions - when
ISB = FALSE
,params
argument now takes the form of regular expressions - Examples for
MCMCtrace
no longer open up external programs (pdf viewer) per CRAN policy
MCMCpstr
function now added. Function returns summary output for a specified function while preserving structure of parameters (i.e., scalar, vector, matrix, array).MCMCtrace
now takes apriors
argument 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.- Fix bug in
MCMCchains
that caused incorrect alphabetization of parameter names when output from R2jags was used.
MCMCsummary
greatly speed up calculation of Rhat values for objects with large numbers of parametersMCMCchains
now takes the argumentmcmc.list
. If specified,mcmc.list
object returned rather than a matrix.
- Fix bug in
MCMCsummary
that displayed the same result twice when selecting only a single output parameter of interest - Fix bug in
MCMCplot
that displayed the axis label too close to tick labels whenhoriz = FALSE
and tick labels were very long MCMCsummary
Rhat values always round to 2 digitsMCMCsummary
output fromfunc
argument rounded to specified digits for rest of outputMCMCsummary
now takes afunc_name
argument. If specified, column displaying output fromfunc
will be labeled with this name. If not specified, column will be labeled 'func'.MCMCplot
change argumentx_axis_text_sz
andx_tick_text_sz
toaxis_text_sz
andtick_text_sz
respectively
- Specification of parameters of interest now works slightly differently. The argument
ISB
(Ignore Square Bracket) has now been added. By defaultISB = TRUE
-params
andexcl
match exactly to parameter names by default (ignoring square brackets). WhenISB = FALSE
, square brackets will not be ignored, and will match on partial names (as when usinggrep
). This applies to all functions. MCMCsummary
now takes afunc
argument. If a function is specified, it will be evaluated for all specified parameters and specified in theMCMCsummary
output.MCMCsummary
speed greatly increased. Parameters of interest are now sorted before calculations are made. Rhat values are no longer masked, but rather not calculated whenRhat = FALSE
. These changes result in dramatic speed ups for large objects.MCMCsummary
bug fixed that caused function to fail when only one chain was runMCMCsummary
standard deviation added to summary output for each parameter.MCMCsummary
number of effective samples added to summary output for each parameter. Default isn.eff = FALSE
(metric will not be calculated or displayed).MCMCtrace
default is now to write trace plots to pdf. Default number of iterations changed to 5000 from 2000.MCMCplot
y-axis labels now vertical whenhoriz = FALSE
to improve readability.MCMCplot
bug that resulted in poor plot dimension choices in some circumstances now fixed.MCMC_data
now contains three chains with 6000 iterations each.- Error message now added about functions not taking objects produced from
jags.samples
function in thecoda
package.coda.samples
should be used instead.
- Fix bug in
MCMCplot
which incorrectly shaded parameter estimates when plotted vertically MCMCsummary
now displays estimates for deviance with MCMC output fits with R2jags
- Fix bug in
MCMCsummary
to do with Cholesky decomposition and calculating Rhat. - Speed up processing of
MCMCsummary
for certain object types. - Fix minor documentation errors in help files for several functions.
MCMCplot
labels now start at top and go down (more intuitive).MCMCtrace
now 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,MCMCtrace
argumentiter_st
(start iteration) changed toiter
(number of iterations from end).- Add
horiz
argument toMCMCplot
- caterpillar plots can now be plotted to run vertically rather than horizontally. Parameters are plotted left to right when plotted vertically. - Remove extended lines on axes for
MCMCplot
- axes lines only goes to the end of ticks now.
- Initial release