Applies a utility function to the value matrix V. If no function is
supplied, values are passed through unchanged (linear / risk-neutral case).
Examples
V <- matrix(c(55, 135, 100, 100), nrow = 2, byrow = TRUE)
p <- c(0.5, 0.5)
rp <- risk_preference("CRRA", param = 1, val_min = 0, val_max = 200,
outcome_name = "frogs", maximize = TRUE)
fns <- use_risk_preference(rp)
voi_problem(V, p) |> transform_to_utility(fns$utility)
#> ℹ VOI problem: 2 actions, 2 states, 2 experiment outcomes.
#> ℹ Utility: values mapped through utility function.
#>
#> ── VOI Problem ──
#>
#> • Actions: 2
#> • States: 2
#> • Experiment outcomes: 2