Description Usage Arguments Value Author(s) Examples
Generate files (data, init, script) that are necessary to run BUGS, call BUGS through the OS, and collect the MCMC output.
1 2 3 4 5 6 7 8 9 10 11 | rbugs(data, inits, paramSet, model,
n.chains = 1, n.iter = 2000, n.burnin = floor(n.iter/2),
n.thin = max(1, floor(n.chains * (n.iter - n.burnin)/1000)),
dic = FALSE,
debug = FALSE,
bugs = system("which OpenBUGS", TRUE),
bugsWorkingDir,
OpenBugs = TRUE,
cleanBugsWorkingDir = FALSE,
genFilesOnly = FALSE,
verbose = FALSE, seed = NULL)
|
data |
a list of data object to be used by BUGS |
inits |
a list of list of initial values, or a function which returns a list of initial values |
paramSet |
a vector of the names of the parameters to be monitored |
model |
the file name of the model description |
n.chains |
the number of chains to be monitored |
n.iter |
the number of iteration of each chain |
n.burnin |
the length of the burn-in |
n.thin |
thinning rate |
dic |
if TRUE, dic will be monitored |
debug |
a logical value indicating whether or not closing the BUGS window |
bugs |
the full name (including the path) of the BUGS executable |
bugsWorkingDir |
a directory to store all the intermediate files |
OpenBugs |
if TRUE, OpenBugs is used |
cleanBugsWorkingDir |
if TRUE, the generated files will be removed from the bugsWorkingDir |
genFilesOnly |
If TRUE, the script, data, inits, and model files will be generated but not run. |
verbose |
if TRUE, print the log file from BUGS |
seed |
an interger of random number seed |
A list with the inforamtion of the MCMC sample and each one of the nChains
.
Jun Yan jyan@stat.uconn.edu and Marcos Prates marcosop@est.ufmg.br
1 | ##see examples in \code{\link{pumps}} and \code{\link{schools}}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.