Write file script.txt
for OpenBUGS to read -
intended for internal use
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)
parameters that should be monitored
number of Markov chains
number of total iterations (including burn in)
length of burn in
thinning parameter
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 and remove them when not needed.
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 (including those from past executions). If
n.burnin>0
, a new burnin is performed, and the previous iterations are
discarded, but execution continues from the status at the end of the previous
execution. When restart=TRUE
, only n.burnin
, n.iter
,
and saveExec
inputs
should be changed from the call creating the .bug file, otherwise
failed or erratic results may be produced.
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
file containing the model written in OpenBUGS code
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 script, which can cause an infinite loop with linux
execution.
logical; whether initial values are given by the user
(TRUE
) or have to be generated by OpenBUGS
logical; if TRUE
, compute deviance, pD, and DIC
automatically in OpenBUGS
as in bugs
meta function
as in bugs
meta function
as in bugs
meta function
random seed for OpenBUGS (default is no seed specified)
If TRUE
, only a parameter summary for very quick analyses is given,
temporary created files are not removed in that case.
If TRUE
(the default), trace plots are generated at the end.
character name of the data file
character vector of names of the inits files
If TRUE
, over-relaxed form of MCMC is used if available from OpenBUGS.
Nothing, but as a side effect, the script file script.txt
is written
The main function to be called by the user is bugs
.