Usage
jags.basic(data, inits, parameters.to.save, model.file,
n.chains, n.adapt=100, n.iter, n.burnin=0, n.thin=1,
modules=c('glm'), parallel=FALSE, DIC=TRUE,
seed=floor(runif(1,1,10000)), save.model=FALSE, verbose=TRUE)Arguments
data
A named list of the data objects required by the model, or a character vector containing the names of the data objects required by the model.
inits
A list with n.chains elements; each element of the
list is itself a list of starting values for the BUGS model,
or a function creating (possibly random) initial values. If inits is
NULL,
parameters.to.save
Character vector of the names of the
parameters in the model which should be monitored.
model.file
Path to file containing the model written in BUGS code
n.chains
Number of Markov chains to run.
n.adapt
Number of iterations to run in the JAGS adaptive phase. Sometimes JAGS chooses not to run these iterations; therefore they are separated from the burn-in in this package.
n.iter
Total number of iterations per chain (including burn-in).
n.burnin
Number of iterations at the beginning of the chain to discard (i.e., the burn-in). Does not include the adaptive phase iterations.
n.thin
Thinning rate. Must be a positive integer.
modules
List of JAGS modules to load before analysis. By default only module 'glm' is loaded (in addition to 'basemod' and 'bugs'). To force no additional modules to load, set modules=NULL.
parallel
If TRUE, run MCMC chains in parallel on multiple CPU cores. Each chain is assigned to a different core, so n.chains must be
DIC
Option to report deviance values. Defaults to TRUE.
seed
Set a custom seed for the R random number generator and JAGS. The current state of the random number generator is saved in the output object.
save.model
Returns the JAGS model as part of the output object to allow updating the model later. If TRUE, the output object will instead be a list of class jagsUIbasic. Default is false.
verbose
If set to FALSE, all text output in the console will be suppressed as the function runs (including most warnings).