Creates a voi_problem object from a matrix of action-state outcomes and
prior/posterior probability vectors. Handles EVPI, EVPXI, and EVSI.
Arguments
- V
Numeric matrix of dimensions (actions x states).
V[a, s]is the outcome of taking actionawhen the true state iss.- p_prior
Numeric vector of length S (number of states) giving the prior probability of each state. Must sum to 1.
- p_posterior
Numeric matrix of dimensions (K x S), where row k gives the posterior probability of each state after the k-th possible experimental outcome. If
NULL, assumes EVPI (perfect information): each outcome reveals one state with certainty.- pp
Numeric vector of length K giving the probability of each experimental outcome. If
NULLandp_posterioris alsoNULL, set equal top_prior(for EVPI). IfNULLbutp_posterioris given, equal weights are assigned.
Examples
# EVPI: 2-action, 2-state chytrid problem (Canessa et al. 2015)
V <- matrix(c(55, 135, 100, 100), nrow = 2, byrow = TRUE)
p <- c(0.5, 0.5)
chytrid <- voi_problem(V, p)
#> ℹ VOI problem: 2 actions, 2 states, 2 experiment outcomes.
# EVSI: with explicit posterior and outcome probabilities
pp <- c(0.395, 0.605)
p_post <- matrix(c(0.92, 0.08, 0.22, 0.78), nrow = 2, byrow = TRUE)
chytrid_si <- voi_problem(V, p, p_post, pp)
#> ℹ VOI problem: 2 actions, 2 states, 2 experiment outcomes.