Usage
"eval.on.grid"(model, utility.fun, grid.spec.list,
n.iter, n.burn.in, n.adapt = 1000, independent.SE = FALSE, parallel = FALSE)
Arguments
model
Simulation model object of class sim.model created using
sim.model or create.normal.model.
utility.fun
An R function defining the utility for the decision problem. It
must be possible to extract the argument names of the function
supplied with formals, and the argument names must constitute a
subset of the names used in the JAGS model specification.
grid.spec.list
A nonempty list of array grid specifications. An array grid
specification is a list of two componenents. The first component is a
dimension vector, giving the dimensions of the array. The second
component is a list of vectors of length equal to the product of the
dimension vector. Each such vector has the form c(lower, upper, step).
These are passed to the function seq in order to generate
a range of values for each component of the array.
n.iter
The number of iterations in the JAGS MCMC simulation for each grid point.
n.burn.in
The number of burn in iterations prior to the JAGS MCMC simulation for
each grid point.
n.adapt
The number of adaptation iterations prior to the burn in phase and
subsequent JAGS MCMC simulation for each grid point.
independent.SE
If TRUE, then the standard errors of the sample means used to estimate the expected
utility will be computed under the assumption of i.i.d. sampling. If
FALSE, the standard errors are instead computed using the
coda::spectrum0.ar function.
parallel
Logical equal to TRUE if the simulation should be done in
parallel on a multi-core processor. The default value FALSE
leads to single-core evaluation.