| Title: | Budget Impact Modelling for Health Technology Assessment |
|---|---|
| Description: | Implements a structured, reproducible framework for budget impact modelling (BIM) in health technology assessment (HTA), following the ISPOR Task Force guidelines (Sullivan et al. (2014) <doi:10.1016/j.jval.2013.08.2291> and Mauskopf et al. (2007) <doi:10.1111/j.1524-4733.2007.00187.x>). Provides functions for epidemiology-driven population estimation, market share modelling with flexible uptake dynamics, per-patient cost calculation across multiple cost categories, multi-year budget projections, payer perspective analysis, deterministic sensitivity analysis (DSA), and probabilistic sensitivity analysis (PSA) via Monte Carlo simulation. Produces submission-quality outputs including ISPOR-aligned summary tables, scenario comparison tables, per-patient cost breakdowns, tornado diagrams, PSA histograms, and text and HTML reports compatible with NICE, CADTH, and EU-HTA dossier formats. Ships with an interactive Shiny dashboard built on 'bslib' for point-and-click model building and exploration. |
| Authors: | Shubhram Pandey [aut, cre] (ORCID: <https://orcid.org/0009-0005-2303-1592>), Heorlytics Ltd [cph] |
| Maintainer: | Shubhram Pandey <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-05-22 18:52:53 UTC |
| Source: | https://github.com/heorlytics/htabim |
Extracts and formats the per-patient annual cost decomposed by cost category (drug, admin, monitoring, adverse events, other) for each treatment in the model. This supports transparency and helps reviewers understand the drivers of differential costs between treatments.
The table is suitable for direct inclusion in HTA dossier appendices.
bim_cost_breakdown(model, year = NULL, currency_millions = FALSE, digits = 0L)bim_cost_breakdown(model, year = NULL, currency_millions = FALSE, digits = 0L)
model |
A |
year |
|
currency_millions |
|
digits |
|
A data.frame with rows = cost categories and columns =
treatments, plus a Total row. Values are formatted character strings.
Carries a "caption" attribute.
bim_costs(), bim_costs_drug(), bim_costs_ae()
pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000), monitoring_costs = c("Drug C (SoC)" = 200, "Drug A (new)" = 1500), ae_costs = c("Drug C (SoC)" = 50, "Drug A (new)" = 300) ) model <- bim_model(pop, ms, costs) bim_cost_breakdown(model)pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000), monitoring_costs = c("Drug C (SoC)" = 200, "Drug A (new)" = 1500), ae_costs = c("Drug C (SoC)" = 50, "Drug A (new)" = 300) ) model <- bim_model(pop, ms, costs) bim_cost_breakdown(model)
Constructs a per-patient annual cost structure for each treatment and cost category (drug, administration, monitoring, adverse events, other). Supports optional inflation adjustment, discounting, and confidential rebates.
bim_costs( treatments, years = 1:5, drug_costs = NULL, admin_costs = NULL, monitoring_costs = NULL, ae_costs = NULL, other_costs = NULL, currency = "GBP", price_year = as.integer(format(Sys.Date(), "%Y")), inflation_rate = 0, rebates = NULL )bim_costs( treatments, years = 1:5, drug_costs = NULL, admin_costs = NULL, monitoring_costs = NULL, ae_costs = NULL, other_costs = NULL, currency = "GBP", price_year = as.integer(format(Sys.Date(), "%Y")), inflation_rate = 0, rebates = NULL )
treatments |
|
years |
|
drug_costs |
Named |
admin_costs |
Named |
monitoring_costs |
Named |
ae_costs |
Named |
other_costs |
Named |
currency |
|
price_year |
|
inflation_rate |
|
rebates |
Named |
An object of class bim_costs, a list containing:
costsA data.frame with columns treatment, year,
category, unit_cost, total_annual_cost.
totalA data.frame with treatment, year,
total_cost_per_patient.
paramsList of all input parameters (rebates stored but not printed).
metaList with currency, price_year, treatments.
bim_costs_drug(), bim_costs_ae(), bim_model()
costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), currency = "GBP", price_year = 2025L, drug_costs = c( RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500 ), monitoring_costs = c( RASi = 650, Sparsentan = 1500, Sibeprenlimab = 1900 ) ) print(costs)costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), currency = "GBP", price_year = 2025L, drug_costs = c( RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500 ), monitoring_costs = c( RASi = 650, Sparsentan = 1500, Sibeprenlimab = 1900 ) ) print(costs)
Computes the expected annual cost of adverse event management per patient, as the sum of (AE rate ?? unit cost) across all adverse events.
bim_costs_ae(treatment, ae_table)bim_costs_ae(treatment, ae_table)
treatment |
|
ae_table |
A
|
A named numeric vector of length 1: expected annual AE cost per
patient, suitable for use in bim_costs().
ae_table <- data.frame( ae_name = c("Injection site reaction", "Fatigue", "URTI"), rate = c(0.07, 0.12, 0.09), unit_cost = c(180, 95, 65), stringsAsFactors = FALSE ) bim_costs_ae("Sibeprenlimab", ae_table)ae_table <- data.frame( ae_name = c("Injection site reaction", "Fatigue", "URTI"), rate = c(0.07, 0.12, 0.09), unit_cost = c(180, 95, 65), stringsAsFactors = FALSE ) bim_costs_ae("Sibeprenlimab", ae_table)
Helper function to derive an annual drug cost per patient from list price, pack size, dose, and dosing frequency. Supports weight-based dosing.
bim_costs_drug( treatment, list_price_per_pack, dose_per_admin, admin_per_year, units_per_pack = 1, wastage_factor = 1, body_weight_kg = NULL )bim_costs_drug( treatment, list_price_per_pack, dose_per_admin, admin_per_year, units_per_pack = 1, wastage_factor = 1, body_weight_kg = NULL )
treatment |
|
list_price_per_pack |
|
dose_per_admin |
|
admin_per_year |
|
units_per_pack |
|
wastage_factor |
|
body_weight_kg |
|
A named numeric vector of length 1: annual drug cost per patient,
suitable for use in bim_costs().
sib_cost <- bim_costs_drug( treatment = "Sibeprenlimab", list_price_per_pack = 2375, dose_per_admin = 1, admin_per_year = 12, units_per_pack = 1 ) sib_costsib_cost <- bim_costs_drug( treatment = "Sibeprenlimab", list_price_per_pack = 2375, dose_per_admin = 1, admin_per_year = 12, units_per_pack = 1 ) sib_cost
A named list containing example inputs for a hypothetical budget impact model for a new treatment (Drug A) in a chronic condition (Disease X), for use in vignettes, examples, and testing. All values are illustrative only and do not represent any real drug, price, or epidemiological estimate.
bim_examplebim_example
A named list with three elements:
population_paramsA list of arguments for bim_population().
market_share_paramsA list of arguments for
bim_market_share() (excluding population).
cost_paramsA list of arguments for bim_costs().
Illustrative values only. Not based on any real submission data.
data(bim_example) str(bim_example) # Reconstruct the full model pop <- do.call(bim_population, bim_example$population_params) ms <- do.call(bim_market_share, c(list(population = pop), bim_example$market_share_params)) costs <- do.call(bim_costs, bim_example$cost_params) model <- bim_model(pop, ms, costs) summary(model)data(bim_example) str(bim_example) # Reconstruct the full model pop <- do.call(bim_population, bim_example$population_params) ms <- do.call(bim_market_share, c(list(population = pop), bim_example$market_share_params)) costs <- do.call(bim_costs, bim_example$cost_params) model <- bim_model(pop, ms, costs) summary(model)
Returns a tidy data.frame of budget impact results from a bim_model()
object, optionally filtered to a specific level of aggregation.
bim_extract(model, level = c("annual", "cumulative"), scenario = "all")bim_extract(model, level = c("annual", "cumulative"), scenario = "all")
model |
A |
level |
|
scenario |
|
A data.frame.
pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) bim_extract(model, level = "annual") bim_extract(model, level = "cumulative")pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) bim_extract(model, level = "annual") bim_extract(model, level = "cumulative")
Combines a bim_population(), bim_market_share(), and bim_costs()
object into a complete budget impact model and computes the annual and
cumulative budget impact across all scenarios.
The budget impact for year t is defined as:
where is the number of eligible patients, is the
market share of treatment , and is the cost per patient
for treatment .
bim_model( population, market_share, costs, payer = bim_payer_default(), discount_rate = 0, label = NULL )bim_model( population, market_share, costs, payer = bim_payer_default(), discount_rate = 0, label = NULL )
population |
A |
market_share |
A |
costs |
A |
payer |
A |
discount_rate |
|
label |
|
An object of class bim_model, a list containing:
populationThe input bim_population object.
market_shareThe input bim_market_share object.
costsThe input bim_costs object.
payerThe input bim_payer object.
resultsA list with annual and cumulative data frames.
metaA list with model metadata.
bim_population(), bim_market_share(), bim_costs(),
bim_payer(), plot.bim_model(), bim_table()
pop <- bim_population( indication = "Disease X", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), new_drug = "Sibeprenlimab", shares_current = c(RASi = 0.75, Sparsentan = 0.25, Sibeprenlimab = 0.00), shares_new = c(RASi = 0.60, Sparsentan = 0.20, Sibeprenlimab = 0.20) ) costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), drug_costs = c(RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500) ) model <- bim_model(pop, ms, costs, label = "IgAN BIM") summary(model)pop <- bim_population( indication = "Disease X", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), new_drug = "Sibeprenlimab", shares_current = c(RASi = 0.75, Sparsentan = 0.25, Sibeprenlimab = 0.00), shares_new = c(RASi = 0.60, Sparsentan = 0.20, Sibeprenlimab = 0.20) ) costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), drug_costs = c(RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500) ) model <- bim_model(pop, ms, costs, label = "IgAN BIM") summary(model)
Specifies which costs are borne by the budget holder and the coverage fraction applied to drug costs. Pre-built payer functions cover the most common HTA settings.
bim_payer( name, perspective = c("healthcare_system", "payer", "societal"), cost_coverage = 1, description = NULL )bim_payer( name, perspective = c("healthcare_system", "payer", "societal"), cost_coverage = 1, description = NULL )
name |
|
perspective |
|
cost_coverage |
|
description |
|
An object of class bim_payer.
bim_payer_nhs(), bim_payer_default(), bim_model()
p <- bim_payer( name = "NHS England", perspective = "healthcare_system", cost_coverage = 1.0 ) print(p)p <- bim_payer( name = "NHS England", perspective = "healthcare_system", cost_coverage = 1.0 ) print(p)
Returns a bim_payer() representing the Canadian Drug Review (CDR)
public payer perspective used in CADTH submissions.
bim_payer_cadth()bim_payer_cadth()
A bim_payer object.
Returns a bim_payer() representing a generic healthcare system
perspective with full cost coverage. Used as the default in bim_model().
bim_payer_default()bim_payer_default()
A bim_payer object.
Returns a bim_payer() representing the NHS England perspective,
appropriate for NICE Technology Appraisal submissions.
bim_payer_nhs()bim_payer_nhs()
A bim_payer object.
Returns a bim_payer() representing a US commercial insurer perspective.
bim_payer_us_commercial()bim_payer_us_commercial()
A bim_payer object.
Displays the annual budget impact as grouped bars, with one group per year and one bar per scenario.
bim_plot_bar(model, currency_millions = TRUE, colours = NULL, title = NULL)bim_plot_bar(model, currency_millions = TRUE, colours = NULL, title = NULL)
model |
A |
currency_millions |
|
colours |
|
title |
|
Called for side effects. Returns invisibly.
Draws a stacked horizontal bar chart of per-patient annual costs by cost component, with one bar per treatment. Useful for visually comparing the cost structure across treatments.
bim_plot_cost_breakdown(model, year = NULL, colours = NULL, title = NULL)bim_plot_cost_breakdown(model, year = NULL, colours = NULL, title = NULL)
model |
A |
year |
|
colours |
Named |
title |
|
Called for side effects. Returns invisibly.
Plots the annual budget impact (or cumulative budget impact) over the projection horizon, with one line per scenario.
bim_plot_line( model, cumulative = FALSE, scenario = "base", currency_millions = TRUE, colours = NULL, title = NULL )bim_plot_line( model, cumulative = FALSE, scenario = "base", currency_millions = TRUE, colours = NULL, title = NULL )
model |
A |
cumulative |
|
scenario |
|
currency_millions |
|
colours |
Named |
title |
|
Called for side effects (plot). Returns invisibly.
Produces a histogram of simulated budget impacts with the base-case value and 95 \
bim_plot_psa( psa, currency_millions = TRUE, title = NULL, col_bar = "#AEC6E8", col_base = "#1a3a5c", col_ci = "#D6604D" )bim_plot_psa( psa, currency_millions = TRUE, title = NULL, col_bar = "#AEC6E8", col_base = "#1a3a5c", col_ci = "#D6604D" )
psa |
A |
currency_millions |
|
title |
|
col_bar |
|
col_base |
|
col_ci |
|
Called for side effects. Returns invisibly.
Draws a horizontal tornado plot from the output of bim_run_dsa(),
showing the range of budget impact for each parameter varied.
bim_plot_tornado( dsa, top_n = 10L, currency = "GBP", currency_millions = TRUE, title = NULL, col_low = "#2171B5", col_high = "#CB181D" )bim_plot_tornado( dsa, top_n = 10L, currency = "GBP", currency_millions = TRUE, title = NULL, col_low = "#2171B5", col_high = "#CB181D" )
dsa |
A |
top_n |
|
currency |
|
currency_millions |
|
title |
|
col_low |
|
col_high |
|
Called for side effects. Returns invisibly.
Builds a year-by-year estimate of the number of patients eligible for a new treatment, using an epidemiology-driven funnel approach aligned with ISPOR Task Force guidelines (Sullivan et al., 2014). Supports prevalent, incident, or combined population approaches.
bim_population( indication, country = "GB", years = 1:5, prevalence = NULL, incidence = NULL, n_total_pop = NULL, diagnosed_rate = 1, treated_rate = 1, eligible_rate = 1, growth_rate = 0, approach = c("prevalent", "incident", "both"), data_source = NULL )bim_population( indication, country = "GB", years = 1:5, prevalence = NULL, incidence = NULL, n_total_pop = NULL, diagnosed_rate = 1, treated_rate = 1, eligible_rate = 1, growth_rate = 0, approach = c("prevalent", "incident", "both"), data_source = NULL )
indication |
|
country |
|
years |
|
prevalence |
|
incidence |
|
n_total_pop |
|
diagnosed_rate |
|
treated_rate |
|
eligible_rate |
|
growth_rate |
|
approach |
|
data_source |
|
An object of class bim_population, which is a list containing:
annualA data.frame with columns year, n_total_pop,
n_prevalent_or_incident, n_diagnosed, n_treated, n_eligible.
paramsA list of all input parameters.
metaA list with indication, country, approach,
data_source.
Sullivan SD, Mauskopf JA, Augustovski F et al. (2014). Budget impact analysis–principles of good practice: report of the ISPOR 2012 Budget Impact Analysis Good Practice II Task Force. Value Health, 17(1):5-14. doi:10.1016/j.jval.2013.08.2291
bim_market_share(), bim_costs(), bim_model()
pop <- bim_population( indication = "Disease X", country = "GB", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) print(pop) summary(pop)pop <- bim_population( indication = "Disease X", country = "GB", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) print(pop) summary(pop)
Produces a structured text summary report of a budget impact model,
written to a file or returned as a character vector. For Word (.docx)
or HTML output, install the suggested packages officer and rmarkdown.
bim_report( model, output_file = NULL, format = c("text", "html", "docx"), title = NULL, author = NULL, date = Sys.Date(), scenario = "base" )bim_report( model, output_file = NULL, format = c("text", "html", "docx"), title = NULL, author = NULL, date = Sys.Date(), scenario = "base" )
model |
A |
output_file |
|
format |
|
title |
|
author |
|
date |
|
scenario |
|
If output_file is NULL, a character vector of report lines.
Otherwise, the path to the written file, invisibly.
pop <- bim_population( indication = "Disease X", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) # Return as character vector rpt <- bim_report(model) cat(rpt, sep = "\n")pop <- bim_population( indication = "Disease X", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) # Return as character vector rpt <- bim_report(model) cat(rpt, sep = "\n")
Executes a one-way deterministic sensitivity analysis (DSA) by varying
each parameter in a bim_sensitivity_spec() individually across its
low/high range while holding all others at their base values.
bim_run_dsa(model, sensitivity, year = NULL, scenario = "base")bim_run_dsa(model, sensitivity, year = NULL, scenario = "base")
model |
A |
sensitivity |
A |
year |
|
scenario |
|
A data.frame with columns parameter, label, low_value,
high_value, bi_low, bi_base, bi_high, range, sorted by
range descending (largest impact first). Can be passed directly to
bim_plot_tornado().
bim_sensitivity_spec(), bim_plot_tornado()
pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) sens <- bim_sensitivity_spec( prevalence_range = c(0.002, 0.005), eligible_rate_range = c(0.20, 0.45), drug_cost_multiplier_range = c(0.85, 1.15) ) dsa <- bim_run_dsa(model, sens, year = 3L) print(dsa)pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) sens <- bim_sensitivity_spec( prevalence_range = c(0.002, 0.005), eligible_rate_range = c(0.20, 0.45), drug_cost_multiplier_range = c(0.85, 1.15) ) dsa <- bim_run_dsa(model, sens, year = 3L) print(dsa)
Performs a Monte Carlo PSA by repeatedly sampling uncertain parameters from their assumed statistical distributions and re-running the budget impact model for each draw. This produces a distribution of budget impact outcomes that reflects joint parameter uncertainty.
Distributional assumptions
Prevalence, diagnosed rate, treated rate, eligible rate – Beta distribution parameterised from the base-case value and a standard error.
Drug cost – LogNormal distribution parameterised from the base-case value and a coefficient of variation (CV).
bim_run_psa( model, n_sim = 1000L, prevalence_se = NULL, diagnosed_rate_se = NULL, treated_rate_se = NULL, eligible_rate_se = NULL, cost_cv = NULL, year = NULL, scenario = "base", seed = NULL ) ## S3 method for class 'bim_psa' print(x, ...)bim_run_psa( model, n_sim = 1000L, prevalence_se = NULL, diagnosed_rate_se = NULL, treated_rate_se = NULL, eligible_rate_se = NULL, cost_cv = NULL, year = NULL, scenario = "base", seed = NULL ) ## S3 method for class 'bim_psa' print(x, ...)
model |
A |
n_sim |
|
prevalence_se |
|
diagnosed_rate_se |
|
treated_rate_se |
|
eligible_rate_se |
|
cost_cv |
|
year |
|
scenario |
|
seed |
|
An object of class bim_psa: a list with elements:
simulationsdata.frame with one row per simulation:
sim, budget_impact, and the sampled parameter values.
summarydata.frame with mean, SD, median, and 95 \
interval of budget impact.
yearThe year summarised.
scenarioThe scenario used.
n_simNumber of simulations run.
base_biBase-case budget impact for reference.
pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000) ) model <- bim_model(pop, ms, costs) set.seed(1) psa <- bim_run_psa(model, n_sim = 200L, prevalence_se = 0.0005, eligible_rate_se = 0.05, cost_cv = 0.10) print(psa)pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000) ) model <- bim_model(pop, ms, costs) set.seed(1) psa <- bim_run_psa(model, n_sim = 200L, prevalence_se = 0.0005, eligible_rate_se = 0.05, cost_cv = 0.10) print(psa)
Produces a side-by-side summary table of budget impact results across all scenarios in a model, showing Year 1, mid-point, final year, and cumulative totals. This is the standard tabular format for dossier submissions following ISPOR Task Force guidelines.
bim_scenario_table(model, years = NULL, currency_millions = TRUE, digits = 2L)bim_scenario_table(model, years = NULL, currency_millions = TRUE, digits = 2L)
model |
A |
years |
|
currency_millions |
|
digits |
|
A data.frame with one row per scenario and columns for each
selected year plus cumulative total, formatted as character strings.
The data.frame carries a "caption" attribute suitable for passing
to knitr::kable().
pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2), scenarios = list( conservative = c("Drug C (SoC)" = 0.9, "Drug A (new)" = 0.1), optimistic = c("Drug C (SoC)" = 0.7, "Drug A (new)" = 0.3) ) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000) ) model <- bim_model(pop, ms, costs) st <- bim_scenario_table(model) print(st)pop <- bim_population( indication = "Disease X", country = "custom", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, diagnosed_rate = 0.60, treated_rate = 0.45, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("Drug C (SoC)", "Drug A (new)"), new_drug = "Drug A (new)", shares_current = c("Drug C (SoC)" = 1.0, "Drug A (new)" = 0.0), shares_new = c("Drug C (SoC)" = 0.8, "Drug A (new)" = 0.2), scenarios = list( conservative = c("Drug C (SoC)" = 0.9, "Drug A (new)" = 0.1), optimistic = c("Drug C (SoC)" = 0.7, "Drug A (new)" = 0.3) ) ) costs <- bim_costs( treatments = c("Drug C (SoC)", "Drug A (new)"), drug_costs = c("Drug C (SoC)" = 500, "Drug A (new)" = 25000) ) model <- bim_model(pop, ms, costs) st <- bim_scenario_table(model) print(st)
Defines parameter ranges for a deterministic sensitivity analysis (DSA)
on a bim_model(). Each parameter is varied individually from its low
to high value while all others are held at their base case value.
bim_sensitivity_spec( prevalence_range = NULL, diagnosed_rate_range = NULL, treated_rate_range = NULL, eligible_rate_range = NULL, new_drug_share_range = NULL, drug_cost_multiplier_range = c(0.85, 1.15), extra_params = NULL )bim_sensitivity_spec( prevalence_range = NULL, diagnosed_rate_range = NULL, treated_rate_range = NULL, eligible_rate_range = NULL, new_drug_share_range = NULL, drug_cost_multiplier_range = c(0.85, 1.15), extra_params = NULL )
prevalence_range |
|
diagnosed_rate_range |
|
treated_rate_range |
|
eligible_rate_range |
|
new_drug_share_range |
|
drug_cost_multiplier_range |
|
extra_params |
Named |
An object of class bim_sensitivity_spec.
sens <- bim_sensitivity_spec( prevalence_range = c(0.002, 0.005), eligible_rate_range = c(0.20, 0.45), new_drug_share_range = c(0.10, 0.30), drug_cost_multiplier_range = c(0.85, 1.15) )sens <- bim_sensitivity_spec( prevalence_range = c(0.002, 0.005), eligible_rate_range = c(0.20, 0.45), new_drug_share_range = c(0.10, 0.30), drug_cost_multiplier_range = c(0.85, 1.15) )
Produces a formatted HTML or plain-text summary table of annual and/or cumulative budget impact, suitable for inclusion in RMarkdown reports or HTA dossiers.
bim_table( model, format = c("both", "annual", "cumulative"), scenario = "base", digits = 0L, caption = NULL, footnote = NULL )bim_table( model, format = c("both", "annual", "cumulative"), scenario = "base", digits = 0L, caption = NULL, footnote = NULL )
model |
A |
format |
|
scenario |
|
digits |
|
caption |
|
footnote |
|
A data.frame formatted for display.
pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) tab <- bim_table(model) print(tab)pop <- bim_population( indication = "Example", country = "GB", years = 1:3, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "NewDrug"), new_drug = "NewDrug", shares_current = c(RASi = 1.0, NewDrug = 0.0), shares_new = c(RASi = 0.8, NewDrug = 0.2) ) costs <- bim_costs( treatments = c("RASi", "NewDrug"), drug_costs = c(RASi = 500, NewDrug = 25000) ) model <- bim_model(pop, ms, costs) tab <- bim_table(model) print(tab)
Opens the htaBIM interactive budget impact modelling dashboard in the
default web browser. Requires the shiny package to be installed.
launch_shiny(...)launch_shiny(...)
... |
Additional arguments passed to |
Called for its side effect (launches a Shiny app). Returns invisibly.
if (interactive() && requireNamespace("shiny", quietly = TRUE)) { launch_shiny() }if (interactive() && requireNamespace("shiny", quietly = TRUE)) { launch_shiny() }
Dispatcher for the various htaBIM plot types. Calls the appropriate
plotting function based on the type argument.
## S3 method for class 'bim_model' plot(x, type = c("line", "bar", "tornado", "shares"), ...)## S3 method for class 'bim_model' plot(x, type = c("line", "bar", "tornado", "shares"), ...)
x |
A |
type |
|
... |
Additional arguments passed to the specific plot function. |
Called for side effects (plot). Returns x invisibly.
bim_plot_line(), bim_plot_bar(), bim_plot_tornado(),
bim_plot_shares()
pop <- bim_population( indication = "Disease X", country = "GB", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), new_drug = "Sibeprenlimab", shares_current = c(RASi = 0.75, Sparsentan = 0.25, Sibeprenlimab = 0.00), shares_new = c(RASi = 0.60, Sparsentan = 0.20, Sibeprenlimab = 0.20) ) costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), drug_costs = c(RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500) ) model <- bim_model(pop, ms, costs) plot(model, type = "line") plot(model, type = "bar") plot(model, type = "shares")pop <- bim_population( indication = "Disease X", country = "GB", years = 1:5, prevalence = 0.003, n_total_pop = 42e6, eligible_rate = 0.30 ) ms <- bim_market_share( population = pop, treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), new_drug = "Sibeprenlimab", shares_current = c(RASi = 0.75, Sparsentan = 0.25, Sibeprenlimab = 0.00), shares_new = c(RASi = 0.60, Sparsentan = 0.20, Sibeprenlimab = 0.20) ) costs <- bim_costs( treatments = c("RASi", "Sparsentan", "Sibeprenlimab"), drug_costs = c(RASi = 200, Sparsentan = 22000, Sibeprenlimab = 28500) ) model <- bim_model(pop, ms, costs) plot(model, type = "line") plot(model, type = "bar") plot(model, type = "shares")
Print method for bim_costs
## S3 method for class 'bim_costs' print(x, ...)## S3 method for class 'bim_costs' print(x, ...)
x |
A |
... |
Further arguments (ignored). |
Print method for bim_dsa
## S3 method for class 'bim_dsa' print(x, ...)## S3 method for class 'bim_dsa' print(x, ...)
x |
A |
... |
Further arguments (ignored). |
Print method for bim_model
## S3 method for class 'bim_model' print(x, ...)## S3 method for class 'bim_model' print(x, ...)
x |
A |
... |
Further arguments (ignored). |
Print method for bim_payer
## S3 method for class 'bim_payer' print(x, ...)## S3 method for class 'bim_payer' print(x, ...)
x |
A |
... |
Further arguments (ignored). |
Print method for bim_population
## S3 method for class 'bim_population' print(x, ...)## S3 method for class 'bim_population' print(x, ...)
x |
A |
... |
Further arguments (ignored). |
Summary method for bim_model
## S3 method for class 'bim_model' summary(object, digits = 0L, ...)## S3 method for class 'bim_model' summary(object, digits = 0L, ...)
object |
A |
digits |
|
... |
Further arguments (ignored). |
The bim_model object, invisibly.
Summary method for bim_population
## S3 method for class 'bim_population' summary(object, ...)## S3 method for class 'bim_population' summary(object, ...)
object |
A |
... |
Further arguments (ignored). |
The bim_population object, invisibly.