Skip to content

Getting Started

This guide shows you how to install voiage and run your first Value of Information analysis.

Terminal window
pip install voiage

For the latest development version with all extras:

Terminal window
git clone https://github.com/edithatogo/voiage.git
cd voiage
uv sync --extra dev
  • Python 3.12–3.14
  • pip and setuptools (included with Python)

We recommend using a virtual environment (venv or conda) to manage dependencies.

Expected Value of Perfect Information (EVPI) is the maximum amount one should be willing to pay to eliminate all uncertainty.

import numpy as np
from voiage.analysis import DecisionAnalysis
from voiage.schema import ValueArray
# Sample net benefit data: 3 simulations x 2 interventions
values = np.array([
[20000.0, 25000.0],
[21000.0, 24800.0],
[20500.0, 25250.0],
])
value_array = ValueArray.from_numpy(values, ["Standard care", "New treatment"])
analysis = DecisionAnalysis(nb_array=value_array)
print(f"The per-decision EVPI is: {analysis.evpi():.2f}")
# Population-level EVPI
population_evpi = analysis.evpi(
population=100000,
time_horizon=10,
discount_rate=0.03,
)
print(f"The population-level EVPI is: {population_evpi:.2f}")

Once you have an EVSI result and know the cost of research, calculate the Expected Net Benefit of Sampling (ENBS):

from voiage.methods.sample_information import enbs
evsi_result = 500000.0
cost_of_research = 150000.0
enbs_value = enbs(evsi_result, cost_of_research)
print(f"The ENBS is: {enbs_value:.2f}")
if enbs_value > 0:
print("The research is potentially worthwhile.")
else:
print("The research may not be worthwhile.")