compareMCMCs {compareMCMCs} | R Documentation |
run a set of MCMCs for performance comparison
Description
run one or more MCMC engines for one model specification, with timing and performance metrics calculated.
Usage
compareMCMCs(
modelInfo = list(),
MCMCcontrol = list(niter = 10000, thin = 1, burnin = 2000),
MCMCs = "nimble",
monitors = character(),
nimbleMCMCdefs = list(),
externalMCMCinfo = list(),
metrics = c("mean", "median", "sd", "CI95_low", "CI95_upp", "efficiency_coda"),
metricOptions = list(),
conversions = list(),
seed = NULL,
needRmodel,
verbose = TRUE,
sessionInfo = TRUE
)
Arguments
modelInfo |
A list of nimble model-specification information
(which may be relevant for JAGS, WinBUGS and/or OpenBUGS as
well) and/or a nimble model itself. To provide information
for a different MCMC engine, see
argument |
MCMCcontrol |
A list with fields |
MCMCs |
A character vector of MCMC cases to run. This can
include "nimble" (default nimble samplers), "jags", "stan", one
of several nimble special cases (see details below), custom
nimble sampler configurations provided via argument
|
monitors |
A character vector of variable names to monitor (record in MCMC output). If missing, this will be determined from the nimble model as all top-level parameter names (e.g. hyper-parameters). |
nimbleMCMCdefs |
A list of information for custom sampler configurations in nimble. See package vignette for details. |
externalMCMCinfo |
A list of arbitrary information for
external MCMC engines, named by engine names. If there is an
external MCMC engine named "myMCMC", then a list element |
metrics |
Either a character vector of registered metric names
to apply to each sample, or a list of elements with either
metric names or metric functions to apply to each sample. See
|
metricOptions |
Optional named list of individual metric
options passed as the third argument (" |
conversions |
List of parameter conversion (transformation) specifications, useful when different MCMCs use different parameterizations. |
seed |
An (arbitrary) numeric value passed to |
needRmodel |
If |
verbose |
If |
sessionInfo |
If |
Details
The special cases provided for the MCMCs
argument
include:
"nimble_noConj": use adaptive random-walk Metropolis-Hastings (ARWMH) samplers in place of Gibbs (conjugate) samplers.
"nimble_RW": use all adaptive random-walk Metropolis-Hastings samplers.
"nimble_slice": use all slice samplers.
See package vignette for more details and examples.
Value
A list of MCMCresult
objects.