eval.on.grid {bdpopt}R Documentation

Evaluate Expected Utility On A Grid


Evaluate the expected utility on a grid using MCMC samples from JAGS. The grid is a subset of the space for the decision variables.


eval.on.grid(model, utility.fun, grid.spec.list,
n.iter, n.burn.in, n.adapt = 1000, independent.SE = FALSE, parallel = FALSE)



Simulation model object of class sim.model created using
sim.model or create.normal.model.


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.


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.


The number of iterations in the JAGS MCMC simulation for each grid point.


The number of burn in iterations prior to the JAGS MCMC simulation for each grid point.


The number of adaptation iterations prior to the burn in phase and subsequent JAGS MCMC simulation for each grid point.


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.


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.


A new simulation model object constructed from the object given as the first argument and the simulation results. The updated components in the new object are model$sim.points, model$sim.means, model$sim.SEs and model$grid.spec.list. See sim.model for a description of these components.


Sebastian Jobjörnsson jobjorns@chalmers.se

See Also


[Package bdpopt version 1.0-1 Index]