eval.eu {bdpopt}R Documentation

Evaluate Expected Utility

Description

Simulate an estimate of the expected utility for a specific completion of the JAGS data, i.e., for a specific point in the decision space. This is a generic function for S3 objects.

Usage

eval.eu(model, utility.fun, data,
n.iter, n.burn.in, n.adapt = 1000, inits = NULL, independent.SE = 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.

data

A named list of R objects which, when combined with the named objects in model$data, leads to a complete specification of the data for the JAGS model.

n.iter

The number of iterations in the JAGS MCMC simulation.

n.burn.in

The number of burn iterations prior to the JAGS MCMC simulation.

n.adapt

The number of adaptation iterations prior to the burn in and JAGS MCMC simulation.

inits

The initial values for the chain passed on to the function rjags::jags.model, unless equal to its default value NULL, in which case JAGS chooses default initial values.

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.

Details

This function is called by eval.on.grid, but also allows the user to evaluate the expected utility for a specific combination of values for the decision variables of the problem.

Value

A list with components

mean

Sample mean of the simulated utilities.

SE

Standard error of the sample mean.

Author(s)

Sebastian Jobjörnsson jobjorns@chalmers.se

See Also

eval.on.grid


[Package bdpopt version 1.0-1 Index]