View source: R/MCMC_configuration.R
configureMCMC | R Documentation |
Creates a default MCMC configuration for a given model.
configureMCMC(
model,
nodes,
control = list(),
monitors,
thin = 1,
monitors2 = character(),
thin2 = 1,
useConjugacy = getNimbleOption("MCMCuseConjugacy"),
onlyRW = FALSE,
onlySlice = FALSE,
multivariateNodesAsScalars = getNimbleOption("MCMCmultivariateNodesAsScalars"),
enableWAIC = getNimbleOption("MCMCenableWAIC"),
controlWAIC = list(),
print = getNimbleOption("verbose"),
autoBlock = FALSE,
oldConf,
...
)
model |
A NIMBLE model object, created from |
nodes |
An optional character vector, specifying the nodes and/or variables for which samplers should be created.
Nodes may be specified in their indexed form, |
control |
An optional list of control arguments to sampler functions. If a control list is provided, the elements will be provided to all sampler functions which utilize the named elements given.
For example, the standard Metropolis-Hastings random walk sampler (sampler_RW) utilizes control list elements |
monitors |
A character vector of node names or variable names, to record during MCMC sampling.
This set of monitors will be recorded with thinning interval |
thin |
The thinning interval for |
monitors2 |
A character vector of node names or variable names, to record during MCMC sampling.
This set of monitors will be recorded with thinning interval |
thin2 |
The thinning interval for |
useConjugacy |
A logical argument, with default value TRUE. If specified as FALSE, then no conjugate samplers will be used, even when a node is determined to be in a conjugate relationship. |
onlyRW |
A logical argument, with default value FALSE. If specified as TRUE, then Metropolis-Hastings random walk samplers (sampler_RW) will be assigned for all non-terminal continuous-valued nodes nodes. Discrete-valued nodes are assigned a slice sampler (sampler_slice), and terminal nodes are assigned a posterior_predictive sampler (sampler_posterior_predictive). |
onlySlice |
A logical argument, with default value FALSE. If specified as TRUE, then a slice sampler is assigned for all non-terminal nodes. Terminal nodes are still assigned a posterior_predictive sampler. |
multivariateNodesAsScalars |
A logical argument, with default value FALSE. If specified as TRUE, then non-terminal multivariate stochastic nodes will have scalar samplers assigned to each of the scalar components of the multivariate node. The default value of FALSE results in a single block sampler assigned to the entire multivariate node. Note, multivariate nodes appearing in conjugate relationships will be assigned the corresponding conjugate sampler (provided |
enableWAIC |
A logical argument, specifying whether to enable WAIC calculations for the resulting MCMC algorithm. Defaults to the value of |
controlWAIC |
A named list of inputs that control the behavior of the WAIC calculation. See |
print |
A logical argument, specifying whether to print the ordered list of default samplers. |
autoBlock |
A logical argument specifying whether to use an automated blocking procedure to determine blocks of model nodes for joint sampling. If TRUE, an MCMC configuration object will be created and returned corresponding to the results of the automated parameter blocking. Default value is FALSE. |
oldConf |
An optional MCMCconf object to modify rather than creating a new MCMCconf from scratch |
... |
Additional named control list elements for default samplers, or additional arguments to be passed to the |
See MCMCconf
for details on how to manipulate the MCMCconf
object
Daniel Turek
buildMCMC
runMCMC
nimbleMCMC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.