Specify treatment market shares for a budget impact model
Source:R/bim_market_share.R
bim_market_share.RdDefines how treatment market shares evolve over time, both in the current scenario (without the new drug) and in the new scenario (with the new drug introduced). Supports constant, linear ramp, logistic S-curve, and step uptake dynamics.
Usage
bim_market_share(
population,
treatments,
new_drug,
shares_current,
shares_new,
dynamics = c("constant", "linear", "logistic", "step"),
uptake_params = NULL,
scenarios = NULL
)Arguments
- population
A
bim_populationobject frombim_population().- treatments
character. Vector of all treatment names, including the new drug.- new_drug
character(1). Name of the new intervention. Must be an element oftreatments.Named
numericvector. Market shares in the current scenario (without the new drug). Values must sum to 1 and all be in[0, 1]. Names must matchtreatments.Named
numericvector. Market shares in the new scenario (with the new drug at full uptake). Values must sum to 1. Names must matchtreatments.- dynamics
character(1). How the new drug's uptake evolves:"constant"–shares_newapply uniformly in all years (default)."linear"– new drug ramps linearly from 0 to target share overuptake_params$ramp_yearsyears."logistic"– S-curve uptake. Requiresuptake_params$year_50pctand optionallyuptake_params$steepness."step"– shares_new is a named list with one vector per year.
- uptake_params
listorNULL. Parameters controlling uptake dynamics:For
"linear":list(ramp_years = 3).For
"logistic":list(year_50pct = 2, steepness = 2).
- scenarios
Named
listorNULL. Alternative market share vectors (named numerics, same structure asshares_new) for scenario analysis. E.g.list(conservative = c(...), optimistic = c(...)).
Value
An object of class bim_market_share, a list containing:
sharesA
data.framewith columnsyear,treatment,scenario,share,n_patients.paramsList of input parameters.
metaList with
treatments,new_drug,dynamics.
Examples
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),
dynamics = "linear",
uptake_params = list(ramp_years = 3)
)
print(ms)
#>
#> -- htaBIM Market Share --
#>
#> Treatments : RASi, Sparsentan, Sibeprenlimab
#> New drug : Sibeprenlimab
#> Dynamics : linear
#> Scenarios : current, base
#>
#> Year 1 shares (base, with new drug):
#> RASi : 70.0%
#> Sparsentan : 23.3%
#> Sibeprenlimab : 6.7%