| Title: | Value of Information Analysis in R |
|---|---|
| Description: | An R interface to the Rust-backed voiage core for Value of Information analysis, with a direct Rust C ABI EVPI path and helper functions for Python environment management where advanced methods still use reticulate. Provides functions for calculating Expected Value of Perfect Information (EVPI), Expected Value of Partial Perfect Information (EVPPI), and Expected Value of Sample Information (EVSI). |
| Authors: | voiage Development Team |
| Maintainer: | voiage Development Team <[email protected]> |
| License: | Apache License (>= 2.0) |
| Version: | 1.0.0 |
| Built: | 2026-07-22 14:45:37 UTC |
| Source: | https://github.com/edithatogo/voiage |
Calculates Expected Value of Perfect Information using the voiage Python library.
evpi(net_benefits, population = NULL, time_horizon = NULL, discount_rate = NULL)evpi(net_benefits, population = NULL, time_horizon = NULL, discount_rate = NULL)
net_benefits |
A matrix or data frame with PSA samples in rows and strategies in columns. |
population |
Optional population size for scaling. |
time_horizon |
Optional time horizon for scaling. |
discount_rate |
Optional discount rate for scaling. |
The calculated EVPI value.
## Not run: net_benefits <- matrix(rnorm(2000), nrow = 1000, ncol = 2) evpi(net_benefits) ## End(Not run)## Not run: net_benefits <- matrix(rnorm(2000), nrow = 1000, ncol = 2) evpi(net_benefits) ## End(Not run)
Calculates Expected Value of Partial Perfect Information using the voiage Python library.
evppi(net_benefits, parameter_samples, parameters_of_interest = NULL, population = NULL, time_horizon = NULL, discount_rate = NULL)evppi(net_benefits, parameter_samples, parameters_of_interest = NULL, population = NULL, time_horizon = NULL, discount_rate = NULL)
net_benefits |
A matrix or data frame with PSA samples in rows and strategies in columns. |
parameter_samples |
A named list or data frame with parameter samples. |
parameters_of_interest |
Optional character vector of parameter names to retain. Defaults to all named parameters in |
population |
Optional population size for scaling. |
time_horizon |
Optional time horizon for scaling. |
discount_rate |
Optional discount rate for scaling. |
The calculated EVPPI value.
## Not run: net_benefits <- matrix(rnorm(2000), nrow = 1000, ncol = 2) param_samples <- list(effect = rnorm(1000), cost = rnorm(1000)) evppi(net_benefits, param_samples) ## End(Not run)## Not run: net_benefits <- matrix(rnorm(2000), nrow = 1000, ncol = 2) param_samples <- list(effect = rnorm(1000), cost = rnorm(1000)) evppi(net_benefits, param_samples) ## End(Not run)
Calculates Expected Value of Sample Information using the voiage Python library.
evsi(model_func, prior_samples, trial_design, population = NULL, time_horizon = NULL, discount_rate = NULL, method = c("two_loop", "regression", "efficient", "moment_based"), n_outer_loops = 100, n_inner_loops = 1000, metamodel = "linear")evsi(model_func, prior_samples, trial_design, population = NULL, time_horizon = NULL, discount_rate = NULL, method = c("two_loop", "regression", "efficient", "moment_based"), n_outer_loops = 100, n_inner_loops = 1000, metamodel = "linear")
model_func |
A function that takes parameter samples and returns net benefits. |
prior_samples |
A named list or data frame with prior parameter samples. |
trial_design |
A list of trial arm specifications. |
population |
Optional population size for scaling. |
time_horizon |
Optional time horizon for scaling. |
discount_rate |
Optional discount rate for scaling. |
method |
EVSI approximation method. |
n_outer_loops |
Number of outer Monte Carlo loops. |
n_inner_loops |
Number of inner Monte Carlo loops. |
metamodel |
Metamodel used for the efficient approximation. |
The calculated EVSI value.
## Not run: model_func <- function(params) { cbind(params$param1, params$param2) } prior_samples <- list(param1 = rnorm(1000), param2 = rnorm(1000)) trial_design <- list( arms = list( list(name = "Treatment", sample_size = 50), list(name = "Control", sample_size = 50) ) ) evsi(model_func, prior_samples, trial_design, method = "efficient") ## End(Not run)## Not run: model_func <- function(params) { cbind(params$param1, params$param2) } prior_samples <- list(param1 = rnorm(1000), param2 = rnorm(1000)) trial_design <- list( arms = list( list(name = "Treatment", sample_size = 50), list(name = "Control", sample_size = 50) ) ) evsi(model_func, prior_samples, trial_design, method = "efficient") ## End(Not run)
Imports and caches the voiage Python module through reticulate.
init_voiage()init_voiage()
Invisibly returns NULL.
## Not run: init_voiage() ## End(Not run)## Not run: init_voiage() ## End(Not run)
Checks whether the voiage Python package is available to reticulate.
is_voiage_available()is_voiage_available()
A logical value indicating whether the Python voiage package can be imported.
## Not run: is_voiage_available() ## End(Not run)## Not run: is_voiage_available() ## End(Not run)
Configures the Python environment reticulate should use before importing voiage.
set_voiage_env(env, type = c("virtualenv", "conda"))set_voiage_env(env, type = c("virtualenv", "conda"))
env |
The virtualenv or conda environment name or path. |
type |
The environment type, either |
Invisibly returns NULL.
## Not run: set_voiage_env("myenv", type = "virtualenv") set_voiage_env("myenv", type = "conda") ## End(Not run)## Not run: set_voiage_env("myenv", type = "virtualenv") set_voiage_env("myenv", type = "conda") ## End(Not run)
An R interface to the voiage Python library for Value of Information analysis, with helper functions for Python environment management and availability checks via reticulate.
The package exports init_voiage, evpi, evppi,
evsi, is_voiage_available, and set_voiage_env.
Documentation policy:
The release ships a PDF reference manual built from the package help pages.
The release also ships a narrative vignette as the long-form companion guide.
voiage Development Team