Learn R Programming

R2OpenBUGS (version 3.2-1.4)

bugs.script: Writes script for running OpenBUGS

Description

Write file script.txt for OpenBUGS to read - intended for internal use

Usage

bugs.script(parameters.to.save, n.chains, n.iter, n.burnin,
           n.thin, saveExec, restart, model.file.bug,
           model.file, debug=FALSE, is.inits, 
           DIC=FALSE, useWINE=FALSE,
           newWINE=TRUE, WINEPATH=NULL, bugs.seed=NULL, summary.only=FALSE,
           save.history=(.Platform$OS.type == "windows" | useWINE==TRUE),
           bugs.data.file, bugs.inits.files,
           over.relax = FALSE)

Arguments

parameters.to.save
parameters that should be monitored
n.chains
number of Markov chains
n.iter
number of total iterations (including burn in)
n.burnin
length of burn in
n.thin
thinning parameter
saveExec
If TRUE, a re-startable image of the OpenBUGS execution is saved with basename(model.file) and extension .bug in the working directory, which must be specified. The .bug files can be large, so users should monitor them carefully an
restart
If TRUE, execution resumes with the final status from the previous execution stored in the .bug file in the working directory. If n.burnin=0,additional iterations are performed and all iterations since the previous burnin are used (i
model.file.bug
If saveExec or restart is TRUE, then model.file.bug receives/contains the OpenBUGS program image for restarting the program. model.file.bug is the name of the file with its full path
model.file
file containing the model written in OpenBUGS code
debug
if FALSE, OpenBUGS is closed automatically, otherwise OpenBUGS remains open for further investigation. With debug = TRUE, no modelQuit() command is added to the end of the scri
is.inits
logical; whether initial values are given by the user (TRUE) or have to be generated by OpenBUGS
DIC
logical; if TRUE, compute deviance, pD, and DIC automatically in OpenBUGS
useWINE
as in bugs meta function
newWINE
as in bugs meta function
WINEPATH
as in bugs meta function
bugs.seed
random seed for OpenBUGS (default is no seed specified)
summary.only
If TRUE, only a parameter summary for very quick analyses is given, temporary created files are not removed in that case.
save.history
If TRUE (the default), trace plots are generated at the end.
bugs.data.file
character name of the data file
bugs.inits.files
character vector of names of the inits files
over.relax
If TRUE, over-relaxed form of MCMC is used if available from OpenBUGS.

Value

  • Nothing, but as a side effect, the script file script.txt is written

See Also

The main function to be called by the user is bugs.