Description Usage Arguments Details See Also
The jags function takes data and starting values as input. It automatically writes a jags script, calls the model, and saves the simulations for easy access in R. Check the R2jags::jags2 for details about the argument.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
(1) a vector or list of the names of the data objects used by the model, (2) a (named) list of the data objects themselves, or (3) the name of a "dump" format file containing the data objects, which must end in ".txt", see example below for details. |
inits |
a list with |
parameters.to.save |
character vector of the names of the parameters to save which should be monitored. |
model.file |
file containing the model written in |
n.chains |
number of Markov chains (default: 3) |
n.iter |
number of total iterations per chain (including burn in; default: 2000) |
n.burnin |
length of burn in, i.e. number of iterations to
discard at the beginning. Default is |
n.thin |
thinning rate. Must be a positive integer. Set
|
DIC |
logical; if |
jags.path |
directory that contains the |
working.directory |
sets working directory during execution of this function; This should be the directory where model file is. |
clearWD |
indicating whether the files ‘data.txt’,
‘inits[1:n.chains].txt’, ‘codaIndex.txt’, ‘jagsscript.txt’,
and ‘CODAchain[1:nchains].txt’ should be removed after |
refresh |
refresh frequency for progress bar, default is |
This modifies the jags2 function in R2jags package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.