Skip to contents

A convenience wrapper that runs the full 6-step pipeline for the Expected Value of Perfect Information (EVPI) — the most you would ever pay for a survey that perfectly resolves all uncertainty before you act.

Usage

calculate_evpi(V, p_prior, rp = NULL, outcome_name = "units")

Arguments

V

Numeric matrix (actions x states). V[a, s] is the outcome of action a in state s.

p_prior

Numeric vector of state probabilities (must sum to 1).

rp

Optional risk_preference object. If supplied, VOI is expressed as a certainty-equivalent difference. If NULL (default), risk-neutral expected-value EVPI is computed.

outcome_name

Character. Label for the outcome units, used in the printed summary (e.g. "frogs", "dollars").

Value

A voi_problem object (invisibly) with all pipeline fields populated, including $value_info (the EVPI). A formatted summary is printed automatically.

Details

For the full step-by-step pipe (needed for risk-averse calculations or non-standard objectives), use voi_problem() followed by the individual pipe functions.

Examples

V <- matrix(c(55, 135, 100, 100), nrow = 2, byrow = TRUE)
p <- c(0.5, 0.5)
calculate_evpi(V, p, outcome_name = "frogs")
#> ℹ VOI problem: 2 actions, 2 states, 2 experiment outcomes.
#> 
#> ── EVPI Summary ──
#> 
#> ── Decision table ──
#> 
#>    action state_1 state_2 EV_prior best_action?
#>  action_1      55     135       95             
#>  action_2     100     100      100          YES
#> ────────────────────────────────────────────────────────────────────────────────
#> ℹ Best action without survey: action_2
#> ℹ Expected outcome without survey: 100 frogs
#> ℹ Expected outcome with perfect information: 117.5 frogs
#> ✔ EVPI = 17.5 frogs
#> ────────────────────────────────────────────────────────────────────────────────