Usage
run.jagsfile(path=stop("No path or model string supplied"),
datalist = NA, initlist = NA, n.chains=NA, data=NA,
model=NA, inits=NA, monitor=NA, call.jags=TRUE,
autorun=FALSE, ...)Arguments
path
either a relative or absolute path to a textfile (including
the file extension) containing a model in the JAGS language and possibly
monitored variable names, data and/or initial values, or a character
string of the same. May also be a vector of paths to
datalist
an optional named list containing variables used as
data, or alternatively a function (with no arguments) that returns a
named list. If any variables are specified in the model block using
'#data# variable', the value for the corresponding named variable
initlist
an optional named list containing variables used as
initial values, or alternatively a function (with a single argument
representing the chain number) that returns a named list. If any
variables are specified in the model block using '#inits# variable',
n.chains
the number of chains to use with the simulation. More
chains will improve the sensitivity of the convergence diagnostic, but
will cause the simulation to run more slowly. If NA, the number of
chains will be taken from the number of inits blocks in the m
data
OPTIONAL character vector in the R dump format (or named
list) containing the data. If supplied (!=NA), all data in the model
file is ignored. Default NA.
model
OPTIONAL model in JAGS syntax. If supplied (!=NA), the
model in the model file is ignored. Default NA.
inits
OPTIONAL character vector(s) in the R dump format
containing the initial value(s). If supplied (!=NA), all inits in the
model file are ignored. Default NA.
monitor
OPTIONAL character vector containing the monitored
variables. If supplied (!=NA), all monitor statements in the model
block are ignored. Default NA.
call.jags
option results in either simulation being called if
TRUE, or returns a named list of the data, model, initial values,
monitored variables and number of chains (which can be supplied to
run.jags) if FALSE.
autorun
option to call autorun.jags rather than run.jags for the
simulation, which allows automatic calculation of the necessary run
length and convergence diagnostics. If TRUE, burnin, sample and
check.conv are ignored. See also