Title: | Bayesian Cost Effectiveness Analysis |
---|---|
Description: | Produces an economic evaluation of a sample of suitable variables of cost and effectiveness / utility for two or more interventions, e.g. from a Bayesian model in the form of MCMC simulations. This package computes the most cost-effective alternative and produces graphical summaries and probabilistic sensitivity analysis, see Baio et al (2017) <doi:10.1007/978-3-319-55718-2>. |
Authors: | Gianluca Baio [aut, cre, cph] , Andrea Berardi [aut] , Anna Heath [aut] , Nathan Green [aut] |
Maintainer: | Gianluca Baio <[email protected]> |
License: | GPL-3 |
Version: | 2.4.6 |
Built: | 2024-10-27 06:23:18 UTC |
Source: | https://github.com/n8thangreen/bcea |
Cost-effectiveness analysis based on the results of a simulation model for a variable of clinical benefits (e) and of costs (c). Produces results to be post-processed to give the health economic analysis. The output is stored in an object of the class "bcea".
bcea( eff, cost, ref = 1, interventions = NULL, .comparison = NULL, Kmax = 50000, k = NULL, plot = FALSE, ... ) ## Default S3 method: bcea( eff, cost, ref = NULL, interventions = NULL, .comparison = NULL, Kmax = 50000, k = NULL, plot = FALSE, ... ) ## S3 method for class 'rjags' bcea(eff, ...) ## S3 method for class 'rstan' bcea(eff, ...) ## S3 method for class 'bugs' bcea(eff, ...)
bcea( eff, cost, ref = 1, interventions = NULL, .comparison = NULL, Kmax = 50000, k = NULL, plot = FALSE, ... ) ## Default S3 method: bcea( eff, cost, ref = NULL, interventions = NULL, .comparison = NULL, Kmax = 50000, k = NULL, plot = FALSE, ... ) ## S3 method for class 'rjags' bcea(eff, ...) ## S3 method for class 'rstan' bcea(eff, ...) ## S3 method for class 'bugs' bcea(eff, ...)
eff |
An object containing |
cost |
An object containing |
ref |
Defines which intervention (columns of |
interventions |
Defines the labels to be associated with each
intervention. By default and if |
.comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
Kmax |
Maximum value of the willingness to pay to be considered.
Default value is |
k |
A(n optional) vector for the values of the willingness
to pay grid. Should be of length > 1 otherwise plots will be empty.
If not specified then BCEA will construct a grid of 501 values
from 0 to |
plot |
A logical value indicating whether the function should produce the summary plot or not. |
... |
Additional arguments |
An object of the class "bcea" containing the following elements
n_sim |
Number of simulations produced by the Bayesian model |
n_comparators |
Number of interventions being analysed |
n_comparisons |
Number of possible pairwise comparisons |
delta.e |
For each possible comparison, the differential in the effectiveness measure |
delta.c |
For each possible comparison, the differential in the cost measure |
ICER |
The value of the Incremental Cost-Effectiveness Ratio |
Kmax |
The maximum value assumed for the willingness to pay threshold |
k |
The vector of values for the grid approximation of the willingness to pay |
ceac |
The value for the Cost-Effectiveness Acceptability Curve, as a function of the willingness to pay |
ib |
The distribution of the Incremental Benefit, for a given willingness to pay |
eib |
The value for the Expected Incremental Benefit, as a function of the willingness to pay |
kstar |
The grid approximation of the break-even point(s) |
best |
A vector containing the numeric label of the intervention that is the most cost-effective for each value of the willingness to pay in the selected grid approximation |
U |
An array including the value of the expected utility for each simulation from the Bayesian model, for each value of the grid approximation of the willingness to pay and for each intervention being considered |
vi |
An array including the value of information for each simulation from the Bayesian model and for each value of the grid approximation of the willingness to pay |
Ustar |
An array including the maximum "known-distribution" utility for each simulation from the Bayesian model and for each value of the grid approximation of the willingness to pay |
ol |
An array including the opportunity loss for each simulation from the Bayesian model and for each value of the grid approximation of the willingness to pay |
evi |
The vector of values for the Expected Value of Information, as a function of the willingness to pay |
interventions |
A vector of labels for all the interventions considered |
ref |
The numeric index associated with the intervention used as reference in the analysis |
comp |
The numeric index(es) associated with the intervention(s) used as comparator(s) in the analysis |
step |
The step size used to form the grid approximation to the willingness to pay |
e |
The |
c |
The |
Gianluca Baio, Andrea Berardi, Nathan Green
Baio G (2013). Bayesian Methods in Health Economics. CRC.
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
# See Baio (2013), Baio (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=TRUE # plots the results ) # Creates a summary table summary( m, # uses the results of the economic evaluation # (a "bcea" object) wtp=25000 # selects the particular value for k ) # Plots the cost-effectiveness plane using base graphics ceplane.plot( m, # plots the Cost-Effectiveness plane comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness to pay # (default: 25,000) graph="base" # selects base graphics (default) ) # Plots the cost-effectiveness plane using ggplot2 if (requireNamespace("ggplot2")) { ceplane.plot( m, # plots the Cost-Effectiveness plane comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness to pay # (default: 25,000) graph="ggplot2"# selects ggplot2 as the graphical engine ) # Some more options ceplane.plot( m, graph="ggplot2", pos="top", size=5, ICER_size=1.5, label.pos=FALSE, opt.theme=ggplot2::theme(text=ggplot2::element_text(size=8)) ) } # Plots the contour and scatterplot of the bivariate # distribution of (Delta_e,Delta_c) contour( m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison nlevels=4, # selects the number of levels to be # plotted (default=4) levels=NULL, # specifies the actual levels to be plotted # (default=NULL, so that R will decide) scale=0.5, # scales the bandwidths for both x- and # y-axis (default=0.5) graph="base" # uses base graphics to produce the plot ) # Plots the contour and scatterplot of the bivariate # distribution of (Delta_e,Delta_c) contour2( m, # uses the results of the economic evaluation # (a "bcea" object) wtp=25000, # selects the willingness-to-pay threshold ) # Using ggplot2 if (requireNamespace("ggplot2")) { contour2( m, # uses the results of the economic evaluation # (a "bcea" object) graph="ggplot2",# selects the graphical engine wtp=25000, # selects the willingness-to-pay threshold label.pos=FALSE # alternative position for the wtp label ) } # Plots the Expected Incremental Benefit for the "bcea" object m eib.plot(m) # Plots the distribution of the Incremental Benefit ib.plot( m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness # to pay (default: 25,000) graph="base" # uses base graphics ) # Produces a plot of the CEAC against a grid of values for the # willingness to pay threshold ceac.plot(m) # Plots the Expected Value of Information for the "bcea" object m evi.plot(m)
# See Baio (2013), Baio (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=TRUE # plots the results ) # Creates a summary table summary( m, # uses the results of the economic evaluation # (a "bcea" object) wtp=25000 # selects the particular value for k ) # Plots the cost-effectiveness plane using base graphics ceplane.plot( m, # plots the Cost-Effectiveness plane comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness to pay # (default: 25,000) graph="base" # selects base graphics (default) ) # Plots the cost-effectiveness plane using ggplot2 if (requireNamespace("ggplot2")) { ceplane.plot( m, # plots the Cost-Effectiveness plane comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness to pay # (default: 25,000) graph="ggplot2"# selects ggplot2 as the graphical engine ) # Some more options ceplane.plot( m, graph="ggplot2", pos="top", size=5, ICER_size=1.5, label.pos=FALSE, opt.theme=ggplot2::theme(text=ggplot2::element_text(size=8)) ) } # Plots the contour and scatterplot of the bivariate # distribution of (Delta_e,Delta_c) contour( m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison nlevels=4, # selects the number of levels to be # plotted (default=4) levels=NULL, # specifies the actual levels to be plotted # (default=NULL, so that R will decide) scale=0.5, # scales the bandwidths for both x- and # y-axis (default=0.5) graph="base" # uses base graphics to produce the plot ) # Plots the contour and scatterplot of the bivariate # distribution of (Delta_e,Delta_c) contour2( m, # uses the results of the economic evaluation # (a "bcea" object) wtp=25000, # selects the willingness-to-pay threshold ) # Using ggplot2 if (requireNamespace("ggplot2")) { contour2( m, # uses the results of the economic evaluation # (a "bcea" object) graph="ggplot2",# selects the graphical engine wtp=25000, # selects the willingness-to-pay threshold label.pos=FALSE # alternative position for the wtp label ) } # Plots the Expected Incremental Benefit for the "bcea" object m eib.plot(m) # Plots the distribution of the Incremental Benefit ib.plot( m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison wtp=25000, # selects the relevant willingness # to pay (default: 25,000) graph="base" # uses base graphics ) # Produces a plot of the CEAC against a grid of values for the # willingness to pay threshold ceac.plot(m) # Plots the Expected Value of Information for the "bcea" object m evi.plot(m)
Select the best option for each value of willingness to pay.
best_interv_given_k(eib, ref, comp)
best_interv_given_k(eib, ref, comp)
eib |
Expected incremental benefit |
ref |
Reference group number |
comp |
Comparison group number(s) |
Group index
Produces a plot of the Cost-Effectiveness Acceptability Curve (CEAC) against the willingness to pay threshold.
## S3 method for class 'bcea' ceac.plot( he, comparison = NULL, pos = c(1, 0), graph = c("base", "ggplot2", "plotly"), ... ) ceac.plot(he, ...)
## S3 method for class 'bcea' ceac.plot( he, comparison = NULL, pos = c(1, 0), graph = c("base", "ggplot2", "plotly"), ... ) ceac.plot(he, ...)
he |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the three options |
... |
If
|
The CEAC estimates the probability of cost-effectiveness, with respect to a given willingness to pay threshold. The CEAC is used mainly to evaluate the uncertainty associated with the decision-making process, since it enables the quantification of the preference of the compared interventions, defined in terms of difference in utilities. Formally, the CEAC is defined as:
If the net benefit function is used as utility function, the definition can be re-written as
effectively depending on the willingness to pay value .
ceac |
If |
The function produces a plot of the cost-effectiveness acceptability curve against the discrete grid of possible values for the willingness to pay parameter. Values of the CEAC closer to 1 indicate that uncertainty in the cost-effectiveness of the reference intervention is very low. Similarly, values of the CEAC closer to 0 indicate that uncertainty in the cost-effectiveness of the comparator is very low.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
data("Vaccine") he <- BCEA::bcea(eff, cost) ceac.plot(he) ceac.plot(he, graph = "base") ceac.plot(he, graph = "ggplot2") ceac.plot(he, graph = "plotly") ceac.plot(he, graph = "ggplot2", title = "my title", line = list(color = "green"), theme = ggplot2::theme_dark()) ## more interventions he2 <- BCEA::bcea(cbind(eff, eff - 0.0002), cbind(cost, cost + 5)) mypalette <- RColorBrewer::brewer.pal(3, "Accent") ceac.plot(he2, graph = "ggplot2", title = "my title", theme = ggplot2::theme_dark(), pos = TRUE, line = list(color = mypalette)) ceac.plot(he, graph = "base", title = "my title", line = list(color = "green")) ceac.plot(he2, graph = "base") ceac.plot(he2, graph = "plotly", pos = "bottom")
data("Vaccine") he <- BCEA::bcea(eff, cost) ceac.plot(he) ceac.plot(he, graph = "base") ceac.plot(he, graph = "ggplot2") ceac.plot(he, graph = "plotly") ceac.plot(he, graph = "ggplot2", title = "my title", line = list(color = "green"), theme = ggplot2::theme_dark()) ## more interventions he2 <- BCEA::bcea(cbind(eff, eff - 0.0002), cbind(cost, cost + 5)) mypalette <- RColorBrewer::brewer.pal(3, "Accent") ceac.plot(he2, graph = "ggplot2", title = "my title", theme = ggplot2::theme_dark(), pos = TRUE, line = list(color = mypalette)) ceac.plot(he, graph = "base", title = "my title", line = list(color = "green")) ceac.plot(he2, graph = "base") ceac.plot(he2, graph = "plotly", pos = "bottom")
Produces a plot the Cost-Effectiveness Acceptability Frontier (CEAF) against the willingness to pay threshold.
## S3 method for class 'pairwise' ceaf.plot(mce, graph = c("base", "ggplot2"), ...) ceaf.plot(mce, ...)
## S3 method for class 'pairwise' ceaf.plot(mce, graph = c("base", "ggplot2"), ...) ceaf.plot(mce, ...)
mce |
The output of the call to the function |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-) match the two options |
... |
Additional arguments |
ceaf |
A ggplot object containing the plot. Returned only if
|
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # inhibits graphical output ) mce <- multi.ce(m) # uses the results of the economic analysis ceaf.plot(mce) # plots the CEAF ceaf.plot(mce, graph = "g") # uses ggplot2 # Use the smoking cessation dataset data(Smoking) m <- bcea(eff, cost, ref = 4, intervention = treats, Kmax = 500, plot = FALSE) mce <- multi.ce(m) ceaf.plot(mce)
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # inhibits graphical output ) mce <- multi.ce(m) # uses the results of the economic analysis ceaf.plot(mce) # plots the CEAF ceaf.plot(mce, graph = "g") # uses ggplot2 # Use the smoking cessation dataset data(Smoking) m <- bcea(eff, cost, ref = 4, intervention = treats, Kmax = 500, plot = FALSE) mce <- multi.ce(m) ceaf.plot(mce)
Choice of base R, ggplot2.
ceef_plot_ggplot(he, frontier_data, frontier_params, ...) ceef_plot_base(he, frontier_data, frontier_params)
ceef_plot_ggplot(he, frontier_data, frontier_params, ...) ceef_plot_base(he, frontier_data, frontier_params)
he |
A |
frontier_data |
Frontier data |
frontier_params |
Frontier parameters |
... |
Additional arguments |
The line connecting successive points on a cost-effectiveness plane which each represent the effect and cost associated with different treatment alternatives. The gradient of a line segment represents the ICER of the treatment comparison between the two alternatives represented by that segment. The cost-effectiveness frontier consists of the set of points corresponding to treatment alternatives that are considered to be cost-effective at different values of the cost-effectiveness threshold. The steeper the gradient between successive points on the frontier, the higher is the ICER between these treatment alternatives and the more expensive alternative would be considered cost-effective only when a high value of the cost-effectiveness threshold is assumed. Points not lying on the cost-effectiveness frontier represent treatment alternatives that are not considered cost-effective at any value of the cost-effectiveness threshold.
## S3 method for class 'bcea' ceef.plot( he, comparators = NULL, pos = c(1, 1), start.from.origins = TRUE, threshold = NULL, flip = FALSE, dominance = TRUE, relative = FALSE, print.summary = TRUE, graph = c("base", "ggplot2"), print.plot = TRUE, ... ) ceef.plot(he, ...)
## S3 method for class 'bcea' ceef.plot( he, comparators = NULL, pos = c(1, 1), start.from.origins = TRUE, threshold = NULL, flip = FALSE, dominance = TRUE, relative = FALSE, print.summary = TRUE, graph = c("base", "ggplot2"), print.plot = TRUE, ... ) ceef.plot(he, ...)
he |
A |
comparators |
Vector specifying the comparators to be included in the
frontier analysis. It must have a length > 1. Default as |
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
start.from.origins |
Logical. Should the frontier start from the
origins of the axes? The argument is reset to |
threshold |
Specifies if the efficiency should be defined based on a
willingness-to-pay threshold value. If set to |
flip |
Logical. Should the axes of the plane be inverted? |
dominance |
Logical. Should the dominance regions be included in the plot? |
relative |
Logical. Should the plot display the absolute measures (the
default as |
print.summary |
Logical. Should the efficiency frontier summary be printed along with the graph? See Details for additional information. |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the two options |
print.plot |
Logical. Should the efficiency frontier be plotted? |
... |
If |
Back compatibility with BCEA previous versions:
The bcea
objects did not include the generating e
and c
matrices in BCEA versions <2.1-0. This function is not compatible with
objects created with previous versions. The matrices can be appended to
bcea
objects obtained using previous versions, making sure that the
class of the object remains unaltered.
The argument print.summary
allows for printing a brief summary of the
efficiency frontier, with default to TRUE
. Two tables are plotted,
one for the interventions included in the frontier and one for the dominated
interventions. The average costs and clinical benefits are included for each
intervention. The frontier table includes the slope for the increase in the
frontier and the non-frontier table displays the dominance type of each
dominated intervention. Please note that the slopes are defined as the
increment in the costs for a unit increment in the benefits even if
flip = TRUE
for consistency with the ICER definition. The angle of
increase is in radians and depends on the definition of the axes, i.e. on
the value given to the flip
argument.
If the argument relative
is set to TRUE
, the graph will not
display the absolute measures of costs and benefits. Instead the axes will
represent differential costs and benefits compared to the reference
intervention (indexed by ref
in the bcea()
function).
ceplane |
A ggplot object containing the plot. Returned only
if |
The function produces a plot of the
cost-effectiveness efficiency frontier. The dots show the simulated values
for the intervention-specific distributions of the effectiveness and costs.
The circles indicate the average of each bivariate distribution, with the
numbers referring to each included intervention. The numbers inside the
circles are black if the intervention is included in the frontier and grey
otherwise. If the option dominance
is set to TRUE
, the
dominance regions are plotted, indicating the areas of dominance.
Interventions in the areas between the dominance region and the frontier are
in a situation of extended dominance.
Andrea Berardi, Gianluca Baio
Baio G (2013). Bayesian Methods in Health Economics. CRC.
IQWIG (2009). “General Methods for the Assessment of the Relation of Benefits to Cost, Version 1.0.” Institute for Quality and Efficiency in Health Care (IQWIG).
## create the bcea object m for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ## produce plot ceef.plot(m, graph = "base") ## tweak the options ## flip axis ceef.plot(m, flip = TRUE, dominance = FALSE, start.from.origins = FALSE, print.summary = FALSE, graph = "base") ## or use ggplot2 instead if(require(ggplot2)){ ceef.plot(m, dominance = TRUE, start.from.origins = FALSE, pos = TRUE, print.summary = FALSE, graph = "ggplot2") }
## create the bcea object m for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ## produce plot ceef.plot(m, graph = "base") ## tweak the options ## flip axis ceef.plot(m, flip = TRUE, dominance = FALSE, start.from.origins = FALSE, print.summary = FALSE, graph = "base") ## or use ggplot2 instead if(require(ggplot2)){ ceef.plot(m, dominance = TRUE, start.from.origins = FALSE, pos = TRUE, print.summary = FALSE, graph = "ggplot2") }
Choice of base R, ggplot2 or plotly.
## S3 method for class 'bcea' ceplane_plot_base(he, wtp = 25000, pos_legend, graph_params, ...) ceplane_plot_base(he, ...) ## S3 method for class 'bcea' ceplane_plot_ggplot(he, pos_legend, graph_params, ...) ceplane_plot_ggplot(he, ...) ## S3 method for class 'bcea' ceplane_plot_plotly(he, wtp = 25000, pos_legend, graph_params, ...) ceplane_plot_plotly(he, ...)
## S3 method for class 'bcea' ceplane_plot_base(he, wtp = 25000, pos_legend, graph_params, ...) ceplane_plot_base(he, ...) ## S3 method for class 'bcea' ceplane_plot_ggplot(he, pos_legend, graph_params, ...) ceplane_plot_ggplot(he, ...) ## S3 method for class 'bcea' ceplane_plot_plotly(he, wtp = 25000, pos_legend, graph_params, ...) ceplane_plot_plotly(he, ...)
he |
A |
wtp |
Willingness to pay threshold; default 25,000 |
pos_legend |
Legend position |
graph_params |
Graph parameters in ggplot2 format |
... |
Additional arguments |
For base R returns a plot
For ggplot2 returns ggplot2 object
For plotly returns a plot in the Viewer
# single comparator data(Vaccine, package = "BCEA") he <- bcea(eff, cost) ceplane.plot(he, graph = "base") ## Not run: # need to provide all the defaults because thats what # ceplane.plot() does graph_params <- list(xlab = "x-axis label", ylab = "y-axis label", title = "my title", xlim = c(-0.002, 0.001), ylim = c(-13, 5), point = list(sizes = 1, colors = "darkgrey"), area = list(color = "lightgrey")) he$delta_e <- as.matrix(he$delta_e) he$delta_c <- as.matrix(he$delta_c) BCEA::ceplane_plot_base(he, graph_params = graph_params) ## single non-default comparator ## multiple comparators data(Smoking) graph_params <- list(xlab = "x-axis label", ylab = "y-axis label", title = "my title", xlim = c(-1, 2.5), ylim = c(-1, 160), point = list(sizes = 0.5, colors = grey.colors(3, start = 0.1, end = 0.7)), area = list(color = "lightgrey")) he <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) BCEA::ceplane_plot_base(he, wtp = 200, pos_legend = FALSE, graph_params = graph_params) ## End(Not run) data(Vaccine) he <- bcea(eff, cost) ceplane.plot(he, graph = "ggplot2") ceplane.plot(he, wtp=10000, graph = "ggplot2", point = list(colors = "blue", sizes = 2), area = list(col = "springgreen3")) data(Smoking) he <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ceplane.plot(he, graph = "ggplot2") ceplane.plot(he, wtp = 200, pos = "right", ICER_size = 2, graph = "ggplot2") ceplane.plot(he, wtp = 200, pos = TRUE, graph = "ggplot2") ceplane.plot(he, graph = "ggplot2", wtp=200, theme = ggplot2::theme_linedraw())
# single comparator data(Vaccine, package = "BCEA") he <- bcea(eff, cost) ceplane.plot(he, graph = "base") ## Not run: # need to provide all the defaults because thats what # ceplane.plot() does graph_params <- list(xlab = "x-axis label", ylab = "y-axis label", title = "my title", xlim = c(-0.002, 0.001), ylim = c(-13, 5), point = list(sizes = 1, colors = "darkgrey"), area = list(color = "lightgrey")) he$delta_e <- as.matrix(he$delta_e) he$delta_c <- as.matrix(he$delta_c) BCEA::ceplane_plot_base(he, graph_params = graph_params) ## single non-default comparator ## multiple comparators data(Smoking) graph_params <- list(xlab = "x-axis label", ylab = "y-axis label", title = "my title", xlim = c(-1, 2.5), ylim = c(-1, 160), point = list(sizes = 0.5, colors = grey.colors(3, start = 0.1, end = 0.7)), area = list(color = "lightgrey")) he <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) BCEA::ceplane_plot_base(he, wtp = 200, pos_legend = FALSE, graph_params = graph_params) ## End(Not run) data(Vaccine) he <- bcea(eff, cost) ceplane.plot(he, graph = "ggplot2") ceplane.plot(he, wtp=10000, graph = "ggplot2", point = list(colors = "blue", sizes = 2), area = list(col = "springgreen3")) data(Smoking) he <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ceplane.plot(he, graph = "ggplot2") ceplane.plot(he, wtp = 200, pos = "right", ICER_size = 2, graph = "ggplot2") ceplane.plot(he, wtp = 200, pos = TRUE, graph = "ggplot2") ceplane.plot(he, graph = "ggplot2", wtp=200, theme = ggplot2::theme_linedraw())
Produces a scatter plot of the cost-effectiveness plane, together with the sustainability area, as a function of the selected willingness to pay threshold.
## S3 method for class 'bcea' ceplane.plot( he, comparison = NULL, wtp = 25000, pos = c(0, 1), graph = c("base", "ggplot2", "plotly"), ... ) ceplane.plot(he, ...)
## S3 method for class 'bcea' ceplane.plot( he, comparison = NULL, wtp = 25000, pos = c(0, 1), graph = c("base", "ggplot2", "plotly"), ... ) ceplane.plot(he, ...)
he |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as |
wtp |
The value of the willingness to pay parameter. Not used if
|
pos |
Parameter to set the position of the legend; for a single
comparison plot, the ICER legend position. Can be given in form of a string
|
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-) match the two options |
... |
If
|
In the plotly version, point_colors
, ICER_colors
and area_color
can also
be specified as rgba colours using either the [plotly]toRGB
function or a rgba colour string, e.g. 'rgba(1, 1, 1, 1)'
.
If graph = "ggplot2"
a ggplot object, or if graph = "plotly"
a plotly object containing the requested plot. Nothing is returned when
graph = "base"
, the default.
Grey dots show the simulated values for the joint distribution of the effectiveness and cost differentials. The larger red dot shows the ICER and the grey area identifies the sustainability area, i.e. the part of the plan for which the simulated values are below the willingness to pay threshold. The proportion of points in the sustainability area effectively represents the CEAC for a given value of the willingness to pay. If the comparators are more than 2 and no pairwise comparison is specified, all scatterplots are graphed using different colours.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
## create the bcea object for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ## produce the base plot ceplane.plot(m, wtp = 200, graph = "base") ## select only one comparator ceplane.plot(m, wtp = 200, graph = "base", comparison = 3) ## use ggplot2 if (requireNamespace("ggplot2")) { ceplane.plot(m, wtp = 200, pos = "right", icer = list(size = 2), graph = "ggplot2") } ## plotly ceplane.plot(m, wtp = 200, graph = "plotly") ceplane.plot(m, wtp = 200, comparison = 1, graph = "plotly")
## create the bcea object for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, Kmax = 500, interventions = treats) ## produce the base plot ceplane.plot(m, wtp = 200, graph = "base") ## select only one comparator ceplane.plot(m, wtp = 200, graph = "base", comparison = 3) ## use ggplot2 if (requireNamespace("ggplot2")) { ceplane.plot(m, wtp = 200, pos = "right", icer = list(size = 2), graph = "ggplot2") } ## plotly ceplane.plot(m, wtp = 200, graph = "plotly") ceplane.plot(m, wtp = 200, comparison = 1, graph = "plotly")
Extends the standard cost-effectiveness analysis to modify the utility function so that risk aversion of the decision maker is explicitly accounted for.
Default vector of risk aversion parameters: 1e-11, 2.5e-6, 5e-6
CEriskav(he) <- value ## S3 replacement method for class 'bcea' CEriskav(he) <- value ## Default S3 replacement method: CEriskav(he) <- value
CEriskav(he) <- value ## S3 replacement method for class 'bcea' CEriskav(he) <- value ## Default S3 replacement method: CEriskav(he) <- value
he |
A |
value |
A vector of values for the risk aversion parameter. If |
An object of the class CEriskav
containing the following
elements:
Ur |
An array containing the simulated values for all the
”known-distribution” utilities for all interventions, all the values of
the willingness to pay parameter and for all the possible values of
|
Urstar |
An array containing the simulated values for the
maximum ”known-distribution” expected utility for all the values of the
willingness to pay parameter and for all the possible values of |
IBr |
An array containing the simulated values for the distribution of
the Incremental Benefit for all the values of the willingness to pay and for
all the possible values of |
eibr |
An array containing the Expected Incremental Benefit for each
value of the willingness to pay parameter and for all the possible values of
|
vir |
An array containing all the simulations for the Value of
Information for each value of the willingness to pay parameter and for all
the possible values of |
evir |
An array containing the Expected Value of Information
for each value of the willingness to pay parameter and for all the possible
values of |
R |
The number of possible values for the parameter of risk aversion
|
r |
The vector containing all the possible values for the parameter of
risk aversion |
Gianluca Baio
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff,c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000 # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) ) # Define the vector of values for the risk aversion parameter, r, eg: r <- c(1e-10, 0.005, 0.020, 0.035) # Run the cost-effectiveness analysis accounting for risk aversion # uses the results of the economic evaluation # if more than 2 interventions, selects the # pairwise comparison CEriskav(m) <- r
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff,c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000 # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) ) # Define the vector of values for the risk aversion parameter, r, eg: r <- c(1e-10, 0.005, 0.020, 0.035) # Run the cost-effectiveness analysis accounting for risk aversion # uses the results of the economic evaluation # if more than 2 interventions, selects the # pairwise comparison CEriskav(m) <- r
Choice of base R, ggplot2.
CEriskav_plot_base(he, pos_legend) CEriskav_plot_ggplot(he, pos_legend)
CEriskav_plot_base(he, pos_legend) CEriskav_plot_ggplot(he, pos_legend)
he |
A |
pos_legend |
Legend position |
Compute Cost-Effectiveness Acceptability Curve
compute_CEAC(ib)
compute_CEAC(ib)
ib |
Incremental benefit |
Array with dimensions (interv x k)
Compute Cost-Effectiveness Acceptability Frontier
compute_ceaf(p_best_interv)
compute_ceaf(p_best_interv)
p_best_interv |
Probability of being best intervention |
A summary measure useful to assess the potential changes in the decision under different scenarios.
compute_EIB(ib)
compute_EIB(ib)
ib |
Incremental benefit |
When considering a pairwise comparison
(e.g. in the simple case of a reference intervention and a comparator,
such as the status quo,
), it is defined as the difference between the
expected utilities of the two alternatives:
Analysis of the expected incremental benefit describes how the decision changes for different values of the threshold. The EIB marginalises out the uncertainty, and does not incorporate and describe explicitly the uncertainty in the outcomes. To overcome this problem the tool of choice is the CEAC.
Array with dimensions (interv x k)
ceac.plot()
, compute_CEAC()
, compute_IB()
For expected incremental benefit plot.
compute_eib_cri(he, alpha_cri = 0.05, cri.quantile = TRUE)
compute_eib_cri(he, alpha_cri = 0.05, cri.quantile = TRUE)
he |
A |
alpha_cri |
Significance level, 0 - 1 |
cri.quantile |
Credible interval quantile?; logical |
cri
Compute Expected Value of Information
compute_EVI(ol)
compute_EVI(ol)
ol |
Opportunity loss |
EVI
Sample of incremental net monetary benefit for each
willingness-to-pay threshold, , and comparator.
compute_IB(df_ce, k)
compute_IB(df_ce, k)
df_ce |
Dataframe of cost and effectiveness deltas |
k |
Vector of willingness to pay values |
Defined as:
If the net benefit function is used as utility function, the definition can be re-written as
Array with dimensions (k x sim x ints)
Defined as
compute_ICER(df_ce)
compute_ICER(df_ce)
df_ce |
Cost-effectiveness dataframe |
ICER for all comparisons
Find willingness-to-pay threshold when optimal decision changes.
compute_kstar(k, best, ref)
compute_kstar(k, best, ref)
k |
Willingness-to-pay grid approximation of the budget willing to invest (vector) |
best |
Best intervention for each |
ref |
Reference intervention (int) |
The value of the break-even point corresponds to the ICER and quantifies the point at which the decision-maker is indifferent between the two options.
integer representing intervention
The difference between the maximum utility computed for the current
parameter configuration (e.g. at the current simulation) and the current
utility of the intervention associated with the maximum utility overall.
compute_ol(Ustar, U, best)
compute_ol(Ustar, U, best)
Ustar |
Maximum utility value (sim x k) |
U |
Net monetary benefit (sim x k x interv) |
best |
Best intervention for given willingness-to-pay (k) |
In mathematical notation,
where is the intervention associated with the overall maximum utility
and
is the maximum utility value among the comparators in the given simulation.
The opportunity loss is a non-negative quantity, since
.
In all simulations where the intervention is more
cost-effective (i.e. when incremental benefit is positive), then
as there would be no opportunity loss, if the parameter configuration were the
one obtained in the current simulation.
Array with dimensions (sim x k)
Compute Probability Best Intervention
compute_p_best_interv(he)
compute_p_best_interv(he)
he |
A |
Sample of net (monetary) benefit for each willingness-to-pay threshold and intervention.
compute_U(df_ce, k)
compute_U(df_ce, k)
df_ce |
Cost-effectiveness dataframe |
k |
Willingness to pay vector |
Array with dimensions (sim x k x ints)
Compute NB for mixture of interventions
compute_Ubar(he, value)
compute_Ubar(he, value)
he |
A |
value |
Mixture weights |
The maximum utility value among the comparators, indicating which intervention produced the most benefits at each simulation.
compute_Ustar(U)
compute_Ustar(U)
U |
Net monetary benefit (sim x k x intervs) |
Array with dimensions (sim x k)
The difference between the maximum utility computed for the current
parameter configuration and the utility of the intervention which
is associated with the maximum utility overall.
compute_vi(Ustar, U)
compute_vi(Ustar, U)
Ustar |
Maximum utility value (sim x k) |
U |
Net monetary benefit (sim x k x interv) |
The value of obtaining additional information on the parameter
to reduce the uncertainty in the decisional process.
It is defined as:
with the maximum utility value for the given simulation
among all comparators and
the expected utility
gained by the adoption of the cost-effective intervention.
Array with dimensions (sim x k)
Choice of base R, ggplot2.
contour_base(he, pos_legend, graph_params, ...) contour_ggplot(he, pos_legend, graph_params, ...)
contour_base(he, pos_legend, graph_params, ...) contour_ggplot(he, pos_legend, graph_params, ...)
he |
A |
pos_legend |
Legend position |
graph_params |
Plot parameters; list |
... |
Additional arguments |
Contour method for objects in the class bcea
.
Produces a scatterplot of the cost-effectiveness plane, with a contour-plot
of the bivariate density of the differentials of cost (y-axis) and
effectiveness (x-axis).
## S3 method for class 'bcea' contour( he, pos = c(0, 1), graph = c("base", "ggplot2"), comparison = NULL, ... ) contour(he, ...)
## S3 method for class 'bcea' contour( he, pos = c(0, 1), graph = c("base", "ggplot2"), comparison = NULL, ... ) contour(he, ...)
he |
A |
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the three options |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
... |
Additional graphical arguments. The usual ggplot2 syntax is used regardless of graph type.
|
ceplane |
A ggplot object containing the plot. Returned only
if |
Plots the cost-effectiveness plane with a
scatterplot of all the simulated values from the (posterior) bivariate
distribution of (), the differentials of effectiveness and
costs; superimposes a contour of the distribution and prints the estimated
value of the probability of each quadrant (combination of positive/negative
values for both
and
)
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
bcea()
,
ceplane.plot()
,
contour2()
data(Vaccine) # run the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=TRUE # plots the results ) contour(m) contour(m, graph = "ggplot2") contour(m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison nlevels=10, # selects the number of levels to be # plotted (default=4) levels=NULL, # specifies the actual levels to be plotted # (default=NULL, so that R will decide) scale=1, # scales the bandwidths for both x- and # y-axis (default=0.5) graph="base" # uses base graphics to produce the plot ) # use the smoking cessation dataset data(Smoking) m <- bcea(eff, cost, ref = 4, intervention = treats, Kmax = 500, plot = FALSE) contour(m) contour(m, graph = "ggplot2")
data(Vaccine) # run the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=TRUE # plots the results ) contour(m) contour(m, graph = "ggplot2") contour(m, # uses the results of the economic evaluation # (a "bcea" object) comparison=1, # if more than 2 interventions, selects the # pairwise comparison nlevels=10, # selects the number of levels to be # plotted (default=4) levels=NULL, # specifies the actual levels to be plotted # (default=NULL, so that R will decide) scale=1, # scales the bandwidths for both x- and # y-axis (default=0.5) graph="base" # uses base graphics to produce the plot ) # use the smoking cessation dataset data(Smoking) m <- bcea(eff, cost, ref = 4, intervention = treats, Kmax = 500, plot = FALSE) contour(m) contour(m, graph = "ggplot2")
Produces a scatterplot of the cost-effectiveness plane, with a contour-plot of the bivariate density of the differentials of cost (y-axis) and effectiveness (x-axis). Also adds the sustainability area (i.e. below the selected value of the willingness-to-pay threshold).
## S3 method for class 'bcea' contour2( he, comparison = NULL, wtp = 25000, graph = c("base", "ggplot2"), pos = c(0, 1), ... ) contour2(he, ...)
## S3 method for class 'bcea' contour2( he, comparison = NULL, wtp = 25000, graph = c("base", "ggplot2"), pos = c(0, 1), ... ) contour2(he, ...)
he |
A |
comparison |
The comparison being plotted. Default to |
wtp |
The selected value of the willingness-to-pay. Default is
|
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the three options |
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
... |
Arguments to be passed to |
contour |
A ggplot item containing the requested plot.
Returned only if |
Plots the cost-effectiveness
plane with a scatterplot of all the simulated values from the (posterior)
bivariate distribution of (), the differentials of
effectiveness and costs; superimposes a contour of the distribution and
prints the value of the ICER, together with the sustainability area.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
bcea()
,
ceplane.plot()
,
contour()
## create the bcea object m for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) ## produce the plot contour2(m, wtp = 200, graph_type = "base") ## or use ggplot2 to plot multiple comparisons contour2(m, wtp = 200, ICER_size = 2, graph_type = "ggplot2") ## vaccination example data(Vaccine) treats = c("Status quo", "Vaccination") m <- bcea(eff, cost, ref = 2, interventions = treats, Kmax = 50000) contour2(m) contour2(m, wtp = 100)
## create the bcea object m for the smoking cessation example data(Smoking) m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) ## produce the plot contour2(m, wtp = 200, graph_type = "base") ## or use ggplot2 to plot multiple comparisons contour2(m, wtp = 200, ICER_size = 2, graph_type = "ggplot2") ## vaccination example data(Vaccine) treats = c("Status quo", "Vaccination") m <- bcea(eff, cost, ref = 2, interventions = treats, Kmax = 50000) contour2(m) contour2(m, wtp = 100)
Creates an object containing the matrix with the parameters simulated using
the MCMC procedure (using JAGS, BUGS or Stan) and a vector of parameters
(strings) that can be used to perform the expected value of partial
information analysis. In the process, createInputs
also checks for
linear dependency among columns of the PSA samples or columns having
constant values and removes them to only leave the fundamental parameters
(to run VoI analysis). This also deals with simulations stored in a
.csv
or .txt
file (e.g. as obtained using bootstrapping from a
non-Bayesian model).
## Default S3 method: createInputs(inputs, print_is_linear_comb = TRUE) createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'rjags' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'bugs' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'stanfit' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'data.frame' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'numeric' createInputs(inputs, print_is_linear_comb = TRUE)
## Default S3 method: createInputs(inputs, print_is_linear_comb = TRUE) createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'rjags' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'bugs' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'stanfit' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'data.frame' createInputs(inputs, print_is_linear_comb = TRUE) ## S3 method for class 'numeric' createInputs(inputs, print_is_linear_comb = TRUE)
inputs |
A |
print_is_linear_comb |
Logical indicator. If set to |
mat |
Data.frame containing all the simulations for all the monitored parameters |
parameters |
Character vectors of the names of all the monitored parameters |
Gianluca Baio, Anna Heath and Mark Strong
Choice of base R, ggplot2 or plotly.
eib_plot_base(he, graph_params, ...) eib_plot_ggplot(he, graph_params, ...) eib_plot_plotly(he, graph_params, ...)
eib_plot_base(he, graph_params, ...) eib_plot_ggplot(he, graph_params, ...) eib_plot_plotly(he, graph_params, ...)
he |
A |
graph_params |
Graph parameters |
... |
Additional parameters |
Produces a plot of the Expected Incremental Benefit (EIB) as a function of the willingness to pay.
## S3 method for class 'bcea' eib.plot( he, comparison = NULL, pos = c(1, 0), size = NULL, plot.cri = NULL, graph = c("base", "ggplot2", "plotly"), ... ) eib.plot(he, ...)
## S3 method for class 'bcea' eib.plot( he, comparison = NULL, pos = c(1, 0), size = NULL, plot.cri = NULL, graph = c("base", "ggplot2", "plotly"), ... ) eib.plot(he, ...)
he |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
size |
Value (in millimetres) of the size of the willingness to pay
label. Used only if |
plot.cri |
Logical value. Should the credible intervals be plotted
along with the expected incremental benefit? Default as |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the three options |
... |
If
|
eib |
If |
The function produces a plot of the
Expected Incremental Benefit as a function of the discrete grid
approximation of the willingness to pay parameter. The break even point
(i.e. the point in which the EIB = 0, i.e. when the optimal decision changes
from one intervention to another) is also showed by default. The value k*
is
the discrete grid approximation of the ICER.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
bcea()
,
ib.plot()
,
ceplane.plot()
data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # plots the results ) eib.plot(m) eib.plot(m, graph = "ggplot2") + ggplot2::theme_linedraw() data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) eib.plot(m)
data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # plots the results ) eib.plot(m) eib.plot(m, graph = "ggplot2") + ggplot2::theme_linedraw() data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) eib.plot(m)
Choice of base R, ggplot2 or plotly.
evi_plot_base(he, data.psa, plot_aes, plot_annotations) evi_plot_ggplot(he, data.psa, plot_aes, plot_annotations) evi_plot_plotly(data.psa, plot_aes, plot_annotations)
evi_plot_base(he, data.psa, plot_aes, plot_annotations) evi_plot_ggplot(he, data.psa, plot_aes, plot_annotations) evi_plot_plotly(data.psa, plot_aes, plot_annotations)
he |
A |
data.psa |
Data |
plot_aes |
Aesthetic parameters |
plot_annotations |
Plot parameters |
Plots the Expected Value of Information (EVI) against the willingness to pay.
## S3 method for class 'bcea' evi.plot(he, graph = c("base", "ggplot2", "plotly"), ...) evi.plot(he, ...)
## S3 method for class 'bcea' evi.plot(he, graph = c("base", "ggplot2", "plotly"), ...) evi.plot(he, ...)
he |
A |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the three options |
... |
Additional graphical arguments:
|
eib |
If |
The function produces a plot of the Expected Value of Information as a function of the discrete grid approximation of the willingness to pay parameter. The break even point(s) (i.e. the point in which the EIB=0, ie when the optimal decision changes from one intervention to another) is(are) also showed.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
bcea()
,
ceac.plot()
,
ceplane.plot()
data(Vaccine) m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # plots the results ) evi.plot(m) data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) evi.plot(m)
data(Vaccine) m <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE # plots the results ) evi.plot(m) data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) evi.plot(m)
Compares the optimal scenario to the mixed case in terms of the EVPI.
## S3 method for class 'mixedAn' evi.plot(he, y.limits = NULL, pos = c(0, 1), graph = c("base", "ggplot2"), ...)
## S3 method for class 'mixedAn' evi.plot(he, y.limits = NULL, pos = c(0, 1), graph = c("base", "ggplot2"), ...)
he |
An object of class |
y.limits |
Range of the y-axis for the graph. The default value is
|
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the two options |
... |
Arguments to be passed to methods, such as graphical parameters
(see |
evi |
A ggplot object containing the plot. Returned only if
|
The function produces a graph showing the difference between the ”optimal” version of the EVPI (when only the most cost-effective intervention is included in the market) and the mixed strategy one (when more than one intervention is considered in the market).
Gianluca Baio, Andrea Berardi
Baio G, Russo P (2009). “A decision-theoretic framework for the application of cost-effectiveness analysis in regulatory processes.” Pharmacoeconomics, 27(8), 5–16. ISSN 20356137, doi:10.1007/bf03320526.
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # produces the plots evi.plot(m) evi.plot(m, graph="base") # Or with ggplot2 if (require(ggplot2)) { evi.plot(m, graph="ggplot2") }
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # produces the plots evi.plot(m) evi.plot(m, graph="base") # Or with ggplot2 if (require(ggplot2)) { evi.plot(m, graph="ggplot2") }
Calculates the Expected Value of Perfect Partial Information (EVPPI) for subsets of parameters. Uses GAM non-parametric regression for single parameter EVPPI and the SPDE-INLA method for larger parameter subsets.
evppi(he, param_idx, input, N = NULL, plot = FALSE, residuals = TRUE, ...) ## Default S3 method: evppi(he, ...) ## S3 method for class 'bcea' evppi( he, param_idx = NULL, input, N = NULL, plot = FALSE, residuals = TRUE, method = NULL, ... )
evppi(he, param_idx, input, N = NULL, plot = FALSE, residuals = TRUE, ...) ## Default S3 method: evppi(he, ...) ## S3 method for class 'bcea' evppi( he, param_idx = NULL, input, N = NULL, plot = FALSE, residuals = TRUE, method = NULL, ... )
he |
A |
param_idx |
A vector of parameters for which the EVPPI should be calculated. This can be given as a string (or vector of strings) of names or a numeric vector, corresponding to the column numbers of important parameters. |
input |
A matrix containing the simulations for all the parameters monitored by the call to JAGS or BUGS. The matrix should have column names matching the names of the parameters and the values in the vector parameter should match at least one of those values. |
N |
The number of PSA simulations used to calculate the EVPPI. The default uses all the available samples. |
plot |
A logical value indicating whether the triangular mesh for
SPDE-INLA should be plotted. Default set to |
residuals |
A logical value indicating whether the fitted values for
the SPDE-INLA method should be outputted. Default set to |
... |
Additional arguments. Details of the methods to compute the EVPPI and their additional arguments are:
|
method |
Character string to select which method to use. The default methods are recommended. However, it is possible (mainly for backward compatibility) to use different methods. |
The single parameter EVPPI has been calculated using the non-parametric GAM regression developed by Strong et al. (2014). The multi-parameter EVPPI is calculated using the SPDE-INLA regression method for Gaussian Process regression developed by Heath et al. (2015).
This function has been completely changed and restructured to make it possible
to change regression method.
The method argument can now be given as a list. The first element element in the
list is a vector giving the regression method for the effects. The second gives
the regression method for the costs. The method' argument can also be given as before which then uses the same regression method for all curves. All other
extra_argscan be given as before.
int.ordcan be updated using the list formulation above to give the interactions for each different curve. The formula argument for GAM can only be given once, either
te()or
s() + s()'
as this is for computational reasons rather than to aid fit.
You can still plot the INLA mesh elements but not output the meshes.
Object of class evppi
:
evppi |
The computed values of evppi for all values of the parameter of willingness to pay. |
index |
A numerical vector with the index associated with the parameters for which the EVPPI was calculated. |
k |
The vector of values for the willingness to pay. |
evi |
The vector of values for the overall EVPPI. |
fitted.costs |
The fitted values for the costs. |
fitted.effects |
The fitted values for the effects. |
parameters |
A single string containing the names of the parameters for which the EVPPI was calculated, used for plotting the EVPPI. |
time |
Computational time (in seconds). |
fit.c |
The object produced by the model fit for the costs. |
fit.e |
The object produced by the model fit for the effects. |
formula |
The formula used to fit the model. |
method |
A string indicating the method used to estimate the EVPPI. |
For multi-parameter, the user can select 3 possible methods. If
method = "GAM"
(BCEA will accept also "gam"
, "G"
or
"g"
), then the computations are based on GAM regression. The user can
also specify the formula for the regression. The default option is to use a
tensor product (e.g. if there are two main parameters, p1
and
p2
, this amounts to setting formula = "te(p1,p2)"
, which
indicates that the two parameters interact). Alternatively, it is possible
to specify a model in which the parameters are independent using the
notation formula = "s(p1) + s(p2)"
. This may lead to worse accuracy in
the estimates.
This is used if method="GP"
(BCEA will also accept the specification
method="gp"
). In this case, the user can also specify the number of
PSA runs that should be used to estimate the hyperparameters of the model
(e.g. n.sim=100
). This value is set by default to 500.
These are all rather technical and are described in detail in Baio et al. (2017).
The optional parameter vector int.ord
can take integer values (c(1,1) is
default) and will force the predictor to include interactions: if
int.ord = c(k, h)
, then all k-way interactions will be used for the
effects and all h-way interactions will be used for the costs. Also, the
user can specify the feature of the mesh for the "spatial" part of the
model. The optional parameter cutoff
(default 0.3) controls the
density of the points inside the mesh. Acceptable values are typically in
the interval (0.1, 0.5), with lower values implying more points (and thus
better approximation and greater computational time). The construction of the
boundaries for the mesh can be controlled by the optional inputs
convex.inner
(default = -0.4) and convex.outer
(default =
-0.7). These should be negative values and can be decreased (say to -0.7 and
-1, respectively) to increase the distance between the points and the outer
boundary, which also increases precision and computational time. The
optional argumentrobust
can be set to TRUE, in which case INLA will
use a t prior distribution for the coefficients of the linear predictor.
Finally, the user can control the accuracy of the INLA grid-search for the
estimation of the hyperparameters. This is done by setting a value
h.value
(default = 0.00005). Lower values imply a more refined search
(and hence better accuracy), at the expense of computational speed. The
method argument can also be given as a list allowing different regression
methods for the effects and costs, and the different incremental decisions.
The first list element should contain a vector of methods for the
incremental effects and the second for the costs, for example
method = list(c("GAM"), c("INLA"))
. The int.ord
argument can also
be given as a list to give different interaction levels for each regression
curve.
By default, when no method is specified by the user, evppi
will
use GAM if the number of parameters is <5 and INLA otherwise.
Anna Heath, Gianluca Baio
Strong M, Oakley JE, Brennan A (2014). “Estimating Multiparameter Partial Expected Value of Perfect Information from a Probabilistic Sensitivity Analysis Sample : A Nonparametric Regression Approach.” Medical Decision Making, 311–326. doi:10.1177/0272989X13505910.
Sadatsafavi M, Bansback N, Zafari Z, Najafzadeh M, Marra C (2013). “Need for speed: An efficient algorithm for calculation of single-parameter expected value of partial perfect information.” Value Heal., 16(2), 438–448. ISSN 10983015, doi:10.1016/j.jval.2012.10.018, http://dx.doi.org/10.1016/j.jval.2012.10.018.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
Baio, Gianluca, Berardi, Andrea, Heath A (2017). Bayesian Cost-Effectiveness Analysis with the R package BCEA. Springer International Publishing. https://link.springer.com/book/10.1007/978-3-319-55718-2.
Heath A, Manolopoulou I, Baio G (2016). “Estimating the expected value of partial perfect information in health economic evaluations using integrated nested Laplace approximation.” Stat. Med., 35(23), 4264–4280. ISSN 0277-6715, doi:10.1002/sim.6983, 1504.05436, https://pubmed.ncbi.nlm.nih.gov/27189534/.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem ## Not run: # Load the post-processed results of the MCMC simulation model # original JAGS output is can be downloaded from here # https://gianluca.statistica.it/book/bcea/code/vaccine.RData data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") # Run the health economic evaluation using BCEA m <- bcea(e.pts, c.pts, ref = 2, interventions = treats) # Compute the EVPPI for a bunch of parameters inp <- createInputs(vaccine_mat) EVPPI <- evppi(m, c("beta.1." , "beta.2."), inp$mat) plot(EVPPI) # deprecated (single parameter) methods EVPPI.so <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "so", n.blocks = 50) EVPPI.sad <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "sad", n.seps = 1) plot(EVPPI.so) plot(EVPPI.sad) # Compute the EVPPI using INLA/SPDE if (require("INLA")) x_inla <- evppi(he = m, 39:40, input = inp$mat) # using GAM regression x_gam <- evppi(he = m, 39:40, input = inp$mat, method = "GAM") # using Strong et al GP regression x_gp <- evppi(he = m, 39:40, input = inp$mat, method = "GP") # plot results if (require("INLA")) plot(x_inla) points(x_inla$k, x_inla$evppi, type = "l", lwd = 2, lty = 2) points(x_gam$k, x_gam$evppi, type = "l", col = "red") points(x_gp$k, x_gp$evppi, type = "l", col = "blue") if (require("INLA")) { plot(x_inla$k, x_inla$evppi, type = "l", lwd = 2, lty = 2) points(x_gam$k, x_gam$evppi, type = "l", col = "red") points(x_gp$k, x_gp$evppi, type = "l", col = "blue") } data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) inp <- createInputs(smoking_output) EVPPI <- evppi(m, c(2,3), inp$mat, h.value = 0.0000005) plot(EVPPI) ## End(Not run) data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") bcea_vacc <- bcea(e.pts, c.pts, ref = 2, interventions = treats) inp <- createInputs(vaccine_mat) evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat)
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem ## Not run: # Load the post-processed results of the MCMC simulation model # original JAGS output is can be downloaded from here # https://gianluca.statistica.it/book/bcea/code/vaccine.RData data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") # Run the health economic evaluation using BCEA m <- bcea(e.pts, c.pts, ref = 2, interventions = treats) # Compute the EVPPI for a bunch of parameters inp <- createInputs(vaccine_mat) EVPPI <- evppi(m, c("beta.1." , "beta.2."), inp$mat) plot(EVPPI) # deprecated (single parameter) methods EVPPI.so <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "so", n.blocks = 50) EVPPI.sad <- evppi(m, c("beta.1.", "beta.2."), inp$mat, method = "sad", n.seps = 1) plot(EVPPI.so) plot(EVPPI.sad) # Compute the EVPPI using INLA/SPDE if (require("INLA")) x_inla <- evppi(he = m, 39:40, input = inp$mat) # using GAM regression x_gam <- evppi(he = m, 39:40, input = inp$mat, method = "GAM") # using Strong et al GP regression x_gp <- evppi(he = m, 39:40, input = inp$mat, method = "GP") # plot results if (require("INLA")) plot(x_inla) points(x_inla$k, x_inla$evppi, type = "l", lwd = 2, lty = 2) points(x_gam$k, x_gam$evppi, type = "l", col = "red") points(x_gp$k, x_gp$evppi, type = "l", col = "blue") if (require("INLA")) { plot(x_inla$k, x_inla$evppi, type = "l", lwd = 2, lty = 2) points(x_gam$k, x_gam$evppi, type = "l", col = "red") points(x_gp$k, x_gp$evppi, type = "l", col = "blue") } data(Smoking) treats <- c("No intervention", "Self-help", "Individual counselling", "Group counselling") m <- bcea(eff, cost, ref = 4, interventions = treats, Kmax = 500) inp <- createInputs(smoking_output) EVPPI <- evppi(m, c(2,3), inp$mat, h.value = 0.0000005) plot(EVPPI) ## End(Not run) data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") bcea_vacc <- bcea(e.pts, c.pts, ref = 2, interventions = treats) inp <- createInputs(vaccine_mat) evppi(bcea_vacc, c("beta.1.", "beta.2."), inp$mat)
Base R and ggplot2 versions.
evppi_plot_base(evppi_obj, pos_legend, col = NULL, annot = FALSE) evppi_plot_ggplot(evppi_obj, pos_legend = c(0, 0.8), col = c(1, 1), ...)
evppi_plot_base(evppi_obj, pos_legend, col = NULL, annot = FALSE) evppi_plot_ggplot(evppi_obj, pos_legend = c(0, 0.8), col = c(1, 1), ...)
evppi_obj |
Object of class evppi |
pos_legend |
Position of legend |
col |
Colour |
annot |
Annotate EVPPI curve with parameter names |
... |
Additional arguments |
Choice of base R, ggplot2
ib_plot_base(he, comparison, wtp, bw, n, xlim) ib_plot_ggplot(he, comparison, wtp, bw, n, xlim)
ib_plot_base(he, comparison, wtp, bw, n, xlim) ib_plot_ggplot(he, comparison, wtp, bw, n, xlim)
he |
A |
comparison |
Comparison intervention |
wtp |
Willingness to pay |
bw |
band width |
n |
Number |
xlim |
x-axis limits |
Plots the distribution of the Incremental Benefit (IB) for a given value of the willingness to pay threshold.
## S3 method for class 'bcea' ib.plot( he, comparison = NULL, wtp = 25000, bw = "bcv", n = 512, xlim = NULL, graph = c("base", "ggplot2"), ... ) ib.plot(he, ...)
## S3 method for class 'bcea' ib.plot( he, comparison = NULL, wtp = 25000, bw = "bcv", n = 512, xlim = NULL, graph = c("base", "ggplot2"), ... ) ib.plot(he, ...)
he |
A |
comparison |
In the case of multiple interventions, specifies the one
to be used in comparison with the reference. Default value of |
wtp |
The value of the willingness to pay threshold. Default value at
|
bw |
Identifies the smoothing bandwidth used to construct the kernel estimation of the IB density. |
n |
The number of equally spaced points at which the density is to be estimated. |
xlim |
The limits of the plot on the x-axis. |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-) match the two options |
... |
Additional arguments |
ib |
A ggplot object containing the requested plot. Returned
only if |
The function produces a plot of the distribution of the Incremental Benefit for a given value of the willingness to pay parameter. The dashed area indicates the positive part of the distribution (i.e. when the reference is more cost-effective than the comparator).
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
data("Vaccine") he <- BCEA::bcea(eff, cost) ib.plot(he)
data("Vaccine") he <- BCEA::bcea(eff, cost) ib.plot(he)
Choice of base R, ggplot2 and plotly.
info_rank_base(he, params) info_rank_ggplot(he, params) info_rank_plotly(params)
info_rank_base(he, params) info_rank_ggplot(he, params) info_rank_plotly(params)
he |
A |
params |
Graph Parameters including data |
Produces a plot similar to a tornado plot, but based on the analysis of the EVPPI. For each parameter and value of the willingness-to-pay threshold, a barchart is plotted to describe the ratio of EVPPI (specific to that parameter) to EVPI. This represents the relative ‘importance’ of each parameter in terms of the expected value of information.
## S3 method for class 'bcea' info.rank( he, inp, wtp = NULL, howManyPars = NA, graph = c("base", "ggplot2", "plotly"), rel = TRUE, ... ) info.rank(he, ...)
## S3 method for class 'bcea' info.rank( he, inp, wtp = NULL, howManyPars = NA, graph = c("base", "ggplot2", "plotly"), rel = TRUE, ... ) info.rank(he, ...)
he |
A |
inp |
Named list from running
|
wtp |
A value of the wtp for which the analysis should be performed. If not specified then the break-even point for the current model will be used. |
howManyPars |
Optional maximum number of parameters to be included in the bar plot. Includes all parameters by default. |
graph |
A string used to select the graphical engine to use for plotting. Should (partial-)match one of the two options "base" or "plotly". Default value is "base" |
rel |
Logical argument that specifies whether the ratio of
EVPPI to EVPI ( |
... |
Additional options. These include graphical parameters that the user can specify:
|
With base graphics: A data.frame containing the ranking of the parameters with the value of the selected summary, for the chosen wtp; with plotly: a plotly object, incorporating in the $rank element the data.frame as above. The function produces a 'Info-rank' plot. This is an extension of standard 'Tornado plots' and presents a ranking of the model parameters in terms of their impact on the expected value of information. For each parameter, the specific individual EVPPI is computed and used to measure the impact of uncertainty in that parameter over the decision-making process, in terms of how large the expected value of gaining more information is.
Anna Heath, Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
## Not run: # Load the post-processed results of the MCMC simulation model # original JAGS output is can be downloaded from here # https://gianluca.statistica.it/book/bcea/code/vaccine.RData data("Vaccine") m <- bcea(eff, cost) inp <- createInputs(vaccine_mat) info.rank(m, inp) info.rank(m, inp, graph = "base") info.rank(m, inp, graph = "plotly") info.rank(m, inp, graph = "ggplot2") ## End(Not run)
## Not run: # Load the post-processed results of the MCMC simulation model # original JAGS output is can be downloaded from here # https://gianluca.statistica.it/book/bcea/code/vaccine.RData data("Vaccine") m <- bcea(eff, cost) inp <- createInputs(vaccine_mat) info.rank(m, inp) info.rank(m, inp, graph = "base") info.rank(m, inp, graph = "plotly") info.rank(m, inp, graph = "ggplot2") ## End(Not run)
Check bcea Class
is.bcea(he)
is.bcea(he)
he |
A |
is.bcea
returns TRUE or FALSE depending on whether its argument
is a bcea class object.
Constructs the automated report from the output of the BCEA.
make.report(he, evppi = NULL, ext = "pdf", echo = FALSE, ...)
make.report(he, evppi = NULL, ext = "pdf", echo = FALSE, ...)
he |
A |
evppi |
An object obtained as output to a call to |
ext |
A string of text to indicate the extension of the
resulting output file. Possible options are |
echo |
A string (default to |
... |
Additional parameters. For example, the user can specify the
value of the willingness to pay |
Gianluca Baio
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
## Not run: data(Vaccine, package = "BCEA") m <- bcea(eff, cost, ref = 2) make.report(m) ## End(Not run)
## Not run: data(Vaccine, package = "BCEA") m <- bcea(eff, cost, ref = 2) make.report(m) ## End(Not run)
Runs the cost-effectiveness analysis, but accounts for the fact that more than one intervention is present on the market.
mixedAn(he) <- value
mixedAn(he) <- value
he |
A |
value |
A vector of market shares associated with the interventions. Its size is the same as the number of possible comparators. By default, assumes uniform distribution for each intervention. |
Creates an object in the class mixedAn
, a subclass of bcea
which contains the results of the health economic evaluation in the mixed analysis case:
Ubar |
An array with the simulations of the ”known-distribution” mixed utilities, for each value of the discrete grid approximation of the willingness to pay parameter |
OL.star |
An array with the simulations of the distribution of the Opportunity Loss for the mixed strategy, for each value of the discrete grid approximation of the willingness to pay parameter |
evi.star |
The Expected Value of Information for the mixed strategy, for each value of the discrete grid approximation of the willingness to pay parameter |
mkt.shares |
The vector of market shares associated with each available intervention |
Gianluca Baio
Baio G, Russo P (2009). “A decision-theoretic framework for the application of cost-effectiveness analysis in regulatory processes.” Pharmacoeconomics, 27(8), 5–16. ISSN 20356137, doi:10.1007/bf03320526.
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE) # inhibits graphical output mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # produces the plots evi.plot(m)
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) plot=FALSE) # inhibits graphical output mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # produces the plots evi.plot(m)
Computes and plots the probability that each of the n_int
interventions
being analysed is the most cost-effective and the cost-effectiveness
acceptability frontier.
## S3 method for class 'bcea' multi.ce(he)
## S3 method for class 'bcea' multi.ce(he)
he |
A |
Original bcea
object (list) of class "pairwise" with additional:
p_best_interv |
A matrix including the probability that each intervention is the most cost-effective for all values of the willingness to pay parameter |
ceaf |
A vector containing the cost-effectiveness acceptability frontier |
Gianluca Baio
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) mce <- multi.ce(m) # uses the results of the economic analysis ceac.plot(mce) ceaf.plot(mce)
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) mce <- multi.ce(m) # uses the results of the economic analysis ceac.plot(mce) ceaf.plot(mce)
Constructor for bcea
new_bcea(df_ce, k)
new_bcea(df_ce, k)
df_ce |
Dataframe of all simulation eff and cost |
k |
Vector of willingness to pay values |
List object of class bcea.
Plots in a single graph the Cost-Effectiveness plane, the Expected Incremental Benefit, the CEAC and the EVPI.
## S3 method for class 'bcea' plot( x, comparison = NULL, wtp = 25000, pos = FALSE, graph = c("base", "ggplot2"), ... )
## S3 method for class 'bcea' plot( x, comparison = NULL, wtp = 25000, pos = FALSE, graph = c("base", "ggplot2"), ... )
x |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
wtp |
The value of the willingness to pay parameter. It is passed to
|
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the two options |
... |
Arguments to be passed to the methods |
The default position of the legend for the cost-effectiveness plane
(produced by ceplane.plot()
) is set to c(1, 1.025)
overriding its default for pos=FALSE
, since multiple ggplot2 plots
are rendered in a slightly different way than single plots.
A plot with four graphical summaries of the health economic evaluation.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
bcea()
,
ceplane.plot()
,
eib.plot()
,
ceac.plot()
,
evi.plot()
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA he <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # does not produce graphical outputs ) # Plots the summary plots for the "bcea" object m using base graphics plot(he, graph = "base") # Plots the same summary plots using ggplot2 if(require(ggplot2)){ plot(he, graph = "ggplot2") ##### Example of a customized plot.bcea with ggplot2 plot(he, graph = "ggplot2", # use ggplot2 theme = theme(plot.title=element_text(size=rel(1.25))), # theme elements must have a name ICER_size = 1.5, # hidden option in ceplane.plot size = rel(2.5) # modifies the size of k = labels ) # in ceplane.plot and eib.plot }
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA he <- bcea( e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # does not produce graphical outputs ) # Plots the summary plots for the "bcea" object m using base graphics plot(he, graph = "base") # Plots the same summary plots using ggplot2 if(require(ggplot2)){ plot(he, graph = "ggplot2") ##### Example of a customized plot.bcea with ggplot2 plot(he, graph = "ggplot2", # use ggplot2 theme = theme(plot.title=element_text(size=rel(1.25))), # theme elements must have a name ICER_size = 1.5, # hidden option in ceplane.plot size = rel(2.5) # modifies the size of k = labels ) # in ceplane.plot and eib.plot }
Summary plot of the health economic analysis when risk aversion is included.
## S3 method for class 'CEriskav' plot(x, pos = c(0, 1), graph = c("base", "ggplot2"), ...)
## S3 method for class 'CEriskav' plot(x, pos = c(0, 1), graph = c("base", "ggplot2"), ...)
x |
An object of the class |
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-)match the two options |
... |
Arguments to be passed to methods, such as graphical parameters
(see |
Plots the Expected Incremental Benefit and the Expected Value of Perfect Information when risk aversion is included in the utility function.
list(eib , evi)
|
A two-elements named list of the ggplot objects
containing the requested plots. Returned only if |
The function produces two plots for the risk aversion analysis. The first
one is the EIB as a function of the discrete grid approximation of the
willingness parameter for each of the possible values of the risk aversion
parameter, r
. The second one is a similar plot for the EVPI.
Gianluca Baio, Andrea Berardi
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # # Load the processed results of the MCMC simulation model data(Vaccine) # # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) # # Define the vector of values for the risk aversion parameter, r, eg: r <- c(1e-10, 0.005, 0.020, 0.035) # # Run the cost-effectiveness analysis accounting for risk aversion CEriskav(m) <- r # # produce the plots plot(m) ## Alternative options, using ggplot2 plot(m, graph = "ggplot2")
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # # Load the processed results of the MCMC simulation model data(Vaccine) # # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000, # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) plot=FALSE # inhibits graphical output ) # # Define the vector of values for the risk aversion parameter, r, eg: r <- c(1e-10, 0.005, 0.020, 0.035) # # Run the cost-effectiveness analysis accounting for risk aversion CEriskav(m) <- r # # produce the plots plot(m) ## Alternative options, using ggplot2 plot(m, graph = "ggplot2")
Plot Expected Value of Partial Information With Respect to a Set of Parameters
## S3 method for class 'evppi' plot(x, pos = c(0, 0.8), graph = c("base", "ggplot2"), col = c(1, 1), ...)
## S3 method for class 'evppi' plot(x, pos = c(0, 0.8), graph = c("base", "ggplot2"), col = c(1, 1), ...)
x |
An object in the class |
pos |
Parameter to set the position of the legend (only relevant for
multiple interventions, ie more than 2 interventions being compared).
Can be given in form
of a string |
graph |
A string used to select the graphical engine to use for
plotting. Should (partial-) match the two options |
col |
Sets the colour for the lines depicted in the graph. |
... |
Arguments to be passed to methods, such as graphical parameters
(see |
Plot with base R or ggplot2.
Gianluca Baio, Andrea Berardi
Baio G (2013). Bayesian Methods in Health Economics. CRC.
## Not run: data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") # Run the health economic evaluation using BCEA m <- bcea(e.pts, c.pts, ref = 2, interventions = treats) # Compute the EVPPI for a bunch of parameters inp <- createInputs(vaccine_mat) # Compute the EVPPI using INLA/SPDE if (require("INLA")) { x0 <- evppi(m, c("beta.1." , "beta.2."), input = inp$mat) plot(x0, pos = c(0,1)) x1 <- evppi(m, c(32,48,49), input = inp$mat) plot(x1, pos = "topright") plot(x0, col = c("black", "red"), pos = "topright") plot(x0, col = c(2,3), pos = "bottomright") plot(x0, pos = c(0,1), graph = "ggplot2") plot(x1, pos = "top", graph = "ggplot2") plot(x0, col = c("black", "red"), pos = "right", graph = "ggplot2") plot(x0, col = c(2,3), size = c(1,2), pos = "bottom", graph = "ggplot2") plot(x0, graph = "ggplot2", theme = ggplot2::theme_linedraw()) } if (FALSE) plot(x0, col = 3, pos = "topright") # The vector 'col' must have the number of elements for an EVPI # colour and each of the EVPPI parameters. Forced to black ## End(Not run)
## Not run: data(Vaccine, package = "BCEA") treats <- c("Status quo", "Vaccination") # Run the health economic evaluation using BCEA m <- bcea(e.pts, c.pts, ref = 2, interventions = treats) # Compute the EVPPI for a bunch of parameters inp <- createInputs(vaccine_mat) # Compute the EVPPI using INLA/SPDE if (require("INLA")) { x0 <- evppi(m, c("beta.1." , "beta.2."), input = inp$mat) plot(x0, pos = c(0,1)) x1 <- evppi(m, c(32,48,49), input = inp$mat) plot(x1, pos = "topright") plot(x0, col = c("black", "red"), pos = "topright") plot(x0, col = c(2,3), pos = "bottomright") plot(x0, pos = c(0,1), graph = "ggplot2") plot(x1, pos = "top", graph = "ggplot2") plot(x0, col = c("black", "red"), pos = "right", graph = "ggplot2") plot(x0, col = c(2,3), size = c(1,2), pos = "bottom", graph = "ggplot2") plot(x0, graph = "ggplot2", theme = ggplot2::theme_linedraw()) } if (FALSE) plot(x0, col = 3, pos = "topright") # The vector 'col' must have the number of elements for an EVPI # colour and each of the EVPPI parameters. Forced to black ## End(Not run)
bcea Print Method
## S3 method for class 'bcea' print(x, digits = getOption("digits"), give.attr = FALSE, no.list = TRUE, ...)
## S3 method for class 'bcea' print(x, digits = getOption("digits"), give.attr = FALSE, no.list = TRUE, ...)
x |
A |
digits |
Minimal number of significant digits, see |
give.attr |
Logical; if TRUE (default), show attributes as sub structures. |
no.list |
Logical; if TRUE, no ‘list of ...’ nor the class are printed. |
... |
Potential further arguments. |
data("Vaccine") he <- BCEA::bcea(eff, cost)
data("Vaccine") he <- BCEA::bcea(eff, cost)
One of the alternative way to set (e,c) comparison group. Simply recompute all comparisons and drop unwanted.
setComparisons(he, comparison)
setComparisons(he, comparison)
he |
A |
comparison |
Selects the comparator, in case of more than two
interventions being analysed. Default as NULL plots all the comparisons
together. Any subset of the possible comparisons can be selected (e.g.,
|
One of the alternative way to set (e,c) comparison group.
setComparisons(he) <- value ## S3 replacement method for class 'bcea' setComparisons(he) <- value ## Default S3 replacement method: setComparisons(he) <- value
setComparisons(he) <- value ## S3 replacement method for class 'bcea' setComparisons(he) <- value ## Default S3 replacement method: setComparisons(he) <- value
he |
A |
value |
Comparison |
bcea-type object
Alternative way to define K
statistic.
setKmax(he) <- value ## S3 replacement method for class 'bcea' setKmax(he) <- value ## Default S3 replacement method: setKmax(he) <- value
setKmax(he) <- value ## S3 replacement method for class 'bcea' setKmax(he) <- value ## Default S3 replacement method: setKmax(he) <- value
he |
A |
value |
Maximum willingness to pay |
bcea-type object
Alternative way to define (e,c) reference group.
setReferenceGroup(he) <- value ## S3 replacement method for class 'bcea' setReferenceGroup(he) <- value ## Default S3 replacement method: setReferenceGroup(he) <- value
setReferenceGroup(he) <- value ## S3 replacement method for class 'bcea' setReferenceGroup(he) <- value ## Default S3 replacement method: setReferenceGroup(he) <- value
he |
A |
value |
Reference group number |
bcea-type object
Using the input in the form of MCMC simulations and after having run the health economic model, produces a summary table of the simulations from the cost-effectiveness analysis.
sim_table(he, ...) ## S3 method for class 'bcea' sim_table(he, wtp = 25000, ...)
sim_table(he, ...) ## S3 method for class 'bcea' sim_table(he, wtp = 25000, ...)
he |
A |
... |
Additional arguments |
wtp |
The value of the willingness to pay threshold to be used in the summary table. |
Produces the following elements:
table |
A table with simulation statistics from the economic model |
names.cols |
A vector of labels to be associated with each column of the table |
wtp |
The selected value of the willingness to pay |
idx_wtp |
The index associated with the selected value of the willingness to pay threshold in the grid used to run the analysis |
Gianluca Baio
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, # defines the variables of c=cost, # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000) # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) # Now can save the simulation exercise in an object using sim_table() sim_table(m, # uses the results of the economic evaluation wtp=25000) # selects the particular value for k
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, # defines the variables of c=cost, # effectiveness and cost ref=2, # selects the 2nd row of (e, c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000) # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0, Kmax) # Now can save the simulation exercise in an object using sim_table() sim_table(m, # uses the results of the economic evaluation wtp=25000) # selects the particular value for k
This data set contains the results of the Bayesian analysis used to model the clinical output and the costs associated with the health economic evaluation of four different smoking cessation interventions.
A data list including the variables needed for the smoking cessation cost-effectiveness analysis. The variables are as follows:
a matrix of 500 simulations from the posterior distribution of the overall costs associated with the four strategies
a dataset containing the characteristics of the smokers in the UK population
a matrix of 500 simulations from the posterior distribution of the clinical benefits associated with the four strategies
a matrix of 500 simulations from the posterior distribution of the life years gained with each strategy
a matrix of 500 simulations from the posterior distribution of the event of smoking cessation with each strategy
a data frame containing the inputs needed for the
network meta-analysis model. The data.frame
object contains:
nobs
: the record ID number, s
: the study ID number, i
:
the intervention ID number, r_i
: the number of patients who quit
smoking, n_i
: the total number of patients for the row-specific arm
and b_i
: the reference intervention for each study
a matrix obtained by running the network
meta-analysis model based on the data contained in the smoking
object
a vector of labels associated with the four strategies
Effectiveness data adapted from Hasselblad V. (1998). Meta-analysis of Multitreatment Studies. Medical Decision Making 1998;18:37-43. Cost and population characteristics data adapted from various sources:
Taylor, D.H. Jr, et al. (2002). Benefits of smoking cessation on longevity. American Journal of Public Health 2002;92(6)
ASH: Action on Smoking and Health (2013). ASH fact sheet on smoking
statistics, https://ash.org.uk/files/documents/ASH_106.pdf
Flack, S., et al. (2007). Cost-effectiveness of interventions for smoking cessation. York Health Economics Consortium, January 2007
McGhan, W.F.D., and Smith, M. (1996). Pharmacoeconomic analysis of smoking-cessation interventions. American Journal of Health-System Pharmacy 1996;53:45-52
Baio G. (2012). Bayesian Methods in Health Economics. CRC/Chapman Hall, London
Computes the weights to be associated with a set of competing models in order to perform structural PSA.
struct.psa( models, effect, cost, ref = NULL, interventions = NULL, Kmax = 50000, plot = FALSE, w = NULL )
struct.psa( models, effect, cost, ref = NULL, interventions = NULL, Kmax = 50000, plot = FALSE, w = NULL )
models |
A list containing the output from either R2jags or R2WinBUGS for all the models that need to be combined in the model average |
effect |
A list containing the measure of effectiveness computed from the various models (one matrix with n.sim x n.ints simulations for each model) |
cost |
A list containing the measure of costs computed from the various models (one matrix with n.sim x n.ints simulations for each model) |
ref |
Which intervention is considered to be the reference
strategy. The default value |
interventions |
Defines the labels to be associated with each
intervention. By default and if |
Kmax |
Maximum value of the willingness to pay to be considered.
Default value is |
plot |
A logical value indicating whether the function should produce the summary plot or not |
w |
A vector of weights. By default it's NULL to indicate that the
function will calculate the model weights based on DIC and the individual
model fit. This behaviour can be overridden by passing a vector |
The model is a list containing the output from either R2jags or R2WinBUGS for all the models that need to be combined in the model average effect is a list containing the measure of effectiveness computed from the various models (one matrix with n_sim x n_ints simulations for each model) cost is a list containing the measure of costs computed from the various models (one matrix with n_sim x n_ints simulations for each model).
List object of bcea object, model weights and DIC
Gianluca Baio
Baio G (2013). Bayesian Methods in Health Economics. CRC.
## Not run: # load sample jags output load(system.file("extdata", "statins_base.RData", package = "BCEA")) load(system.file("extdata", "statins_HC.RData", package = "BCEA")) interventions <- c("Atorvastatin", "Fluvastatin", "Lovastatin", "Pravastatin", "Rosuvastatin", "Simvastatin") m1 <- bcea(eff = statins_base$sims.list$effect, cost = statins_base$sims.list$cost.tot, ref = 1, interventions = interventions) m2 <- bcea(eff = statins_HC$sims.list$effect, cost = statins_HC$sims.list$cost.tot, ref = 1, interventions = interventions) models <- list(statins_base, statins_HC) effects <- list(statins_base$sims.list$effect, statins_HC$sims.list$effect) costs <- list(statins_base$sims.list$cost.tot, statins_HC$sims.list$cost.tot) m3 <- struct.psa(models, effects, costs, ref = 1, interventions = interventions) ## End(Not run)
## Not run: # load sample jags output load(system.file("extdata", "statins_base.RData", package = "BCEA")) load(system.file("extdata", "statins_HC.RData", package = "BCEA")) interventions <- c("Atorvastatin", "Fluvastatin", "Lovastatin", "Pravastatin", "Rosuvastatin", "Simvastatin") m1 <- bcea(eff = statins_base$sims.list$effect, cost = statins_base$sims.list$cost.tot, ref = 1, interventions = interventions) m2 <- bcea(eff = statins_HC$sims.list$effect, cost = statins_HC$sims.list$cost.tot, ref = 1, interventions = interventions) models <- list(statins_base, statins_HC) effects <- list(statins_base$sims.list$effect, statins_HC$sims.list$effect) costs <- list(statins_base$sims.list$cost.tot, statins_HC$sims.list$cost.tot) m3 <- struct.psa(models, effects, costs, ref = 1, interventions = interventions) ## End(Not run)
bcea
Produces a table printout with some summary results of the health economic evaluation.
## S3 method for class 'bcea' summary(object, wtp = 25000, ...)
## S3 method for class 'bcea' summary(object, wtp = 25000, ...)
object |
A |
wtp |
The value of the willingness to pay threshold used in the summary table. |
... |
Additional arguments affecting the summary produced. |
Prints a summary table with some information on the health economic output and synthetic information on the economic measures (EIB, CEAC, EVPI).
Gianluca Baio
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
data(Vaccine) he <- bcea(eff, cost, interventions = treats, ref = 2) summary(he)
data(Vaccine) he <- bcea(eff, cost, interventions = treats, ref = 2) summary(he)
mixedAn
(Mixed Analysis)Prints a summary table for the results of the mixed analysis for the economic evaluation of a given model.
## S3 method for class 'mixedAn' summary(object, wtp = 25000, ...)
## S3 method for class 'mixedAn' summary(object, wtp = 25000, ...)
object |
An object of the class |
wtp |
The value of the willingness to pay chosen to present the analysis. |
... |
Additional arguments affecting the summary produced. |
Produces a table with summary information on the loss in expected value of information generated by the inclusion of non cost-effective interventions in the market.
Gianluca Baio
Baio G, Russo P (2009). “A decision-theoretic framework for the application of cost-effectiveness analysis in regulatory processes.” Pharmacoeconomics, 27(8), 5–16. ISSN 20356137, doi:10.1007/bf03320526.
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000 # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) ) mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # Prints a summary of the results summary(m, # uses the results of the mixed strategy analysis wtp=25000) # (a "mixedAn" object) # selects the relevant willingness to pay # (default: 25,000)
# See Baio G., Dawid A.P. (2011) for a detailed description of the # Bayesian model and economic problem # Load the processed results of the MCMC simulation model data(Vaccine) # Runs the health economic evaluation using BCEA m <- bcea(e=eff, c=cost, # defines the variables of # effectiveness and cost ref=2, # selects the 2nd row of (e,c) # as containing the reference intervention interventions=treats, # defines the labels to be associated # with each intervention Kmax=50000 # maximum value possible for the willingness # to pay threshold; implies that k is chosen # in a grid from the interval (0,Kmax) ) mixedAn(m) <- NULL # uses the results of the mixed strategy # analysis (a "mixedAn" object) # the vector of market shares can be defined # externally. If NULL, then each of the T # interventions will have 1/T market share # Prints a summary of the results summary(m, # uses the results of the mixed strategy analysis wtp=25000) # (a "mixedAn" object) # selects the relevant willingness to pay # (default: 25,000)
pairwise
Produces a table printout with some summary results of the health economic evaluation.
## S3 method for class 'pairwise' summary(object, wtp = 25000, ...)
## S3 method for class 'pairwise' summary(object, wtp = 25000, ...)
object |
A |
wtp |
The value of the willingness to pay threshold used in the summary table. |
... |
Additional arguments affecting the summary produced. |
Prints a summary table with some information on the health economic output and synthetic information on the economic measures (EIB, CEAC, EVPI).
Gianluca Baio
Baio G, Dawid aP (2011). “Probabilistic sensitivity analysis in health economics.” Stat. Methods Med. Res., 1–20. ISSN 1477-0334, doi:10.1177/0962280211419832, https://pubmed.ncbi.nlm.nih.gov/21930515/.
Baio G (2013). Bayesian Methods in Health Economics. CRC.
data(Vaccine) he <- bcea(eff, cost, interventions = treats, ref = 2) he_multi <- multi.ce(he) summary(he_multi)
data(Vaccine) he <- bcea(eff, cost, interventions = treats, ref = 2) he_multi <- multi.ce(he) summary(he_multi)
Calculate Dataset For ICERs From bcea Object
tabulate_means(he, comp_label = NULL, ...)
tabulate_means(he, comp_label = NULL, ...)
he |
A |
comp_label |
Optional vector of strings with comparison labels |
... |
Additional arguments |
A data.frame object including mean outcomes, comparison identifier, comparison label and associated ICER
data("Smoking") he <- BCEA::bcea(eff, cost) tabulate_means(he)
data("Smoking") he <- BCEA::bcea(eff, cost) tabulate_means(he)
This data set contains the results of the Bayesian analysis used to model the clinical output and the costs associated with an influenza vaccination.
A data list including the variables needed for the influenza vaccination. The variables are as follows:
a matrix of simulations from the posterior distribution of the overall costs associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for GP visits associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for hospitalisations associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for over-the-counter medications associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for time off work associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for time needed to get the vaccination associated with the two treatments
a matrix of simulations from the posterior distribution of the costs for travel to get vaccination associated with the two treatments
a matrix of simulations from the posterior distribution of the overall costs for first line of treatment associated with the two interventions
a matrix of simulations from the posterior distribution of the overall costs for second line of treatment associated with the two interventions
a matrix of simulations from the posterior distribution of the costs for vaccination
a matrix of simulations from the posterior distribution of the clinical benefits associated with the two treatments
the number of subjects in the reference population
the number of clinical outcomes analysed
the number of health-care resources under study
a vector from the posterior distribution of the QALYs associated with advert events
a vector from the posterior distribution of the QALYs associated with death
a vector from the posterior distribution of the QALYs associated with hospitalisation
a vector from the posterior distribution of the QALYs associated with influenza infection
a vector from the posterior distribution of the QALYs associated with pneumonia
a vector of labels associated with the two treatments
a matrix containing the simulations for the parameters used in the original model
Adapted from Turner D, Wailoo A, Cooper N, Sutton A, Abrams K, Nicholson K. The cost-effectiveness of influenza vaccination of healthy adults 50-64 years of age. Vaccine. 2006;24:1035-1043.
Baio, G., Dawid, A. P. (2011). Probabilistic Sensitivity Analysis in Health Economics. Statistical Methods in Medical Research doi:10.1177/0962280211419832.