BCEA: An R package to perform Bayesian Cost-Effectiveness Analysis

BCEA is a R library specifically designed to post-process the result of a Bayesian health economic evaluation. Typically, this consists in the estimation of a set of relevant parameters that can be combined to produce an estimation of suitable measures of cost (c) and clinical benefits (e) associated with an intervention. Within the Bayesian framework, this amounts to estimating a posterior distribution for the pair (e,c).  

Health economic evaluations then proceed by computing some relevant summaries of the resulting decision process: is the innovative intervention t1 more "cost-effective" than the standard intervention t0BCEA provides a set of functions that can be used to produce a standardised analysis. The package has been created to complement my book on Bayesian methods in health economics where it features heavily (some discussion of the package in the blog can be found here, herehere and here). A discussion of the changes in release 2.0 is here. 

A stable version 2.2-4 is now available on CRAN; a beta release 2.2-5 (including some features under testing) can be downloaded here (tar.gz).

BCEA produces a synthesis of the decision process given the current evidence and uncertainty, as well as several indicators that can be used to perform Probabilistic Sensitivity Analysis to parameter and model uncertainty. These include the Cost-Effectiveness Acceptability Curve and the analysis of the Expected Value of Information, that can be used to prioritize research. Examples of the output of the function are given below:

> library(BCEA)
> data(Vaccine)
> ints <- c("Standard care","Vaccination")
> m <- bcea(e,c,ref=2,interventions=ints)
> summary(m)

Cost-effectiveness analysis summary 

Reference intervention: Vaccination
Comparator intervention: Standard care

Optimal decision: choose Standard care for k<20100 and Vaccination for k>=20100

Analysis for willingness to pay parameter k=25000

                   Expected utility
Standard care          -36.054
Vaccination            -34.826

                                                                 EIB    CEAC     ICER
Vaccination vs Standard care 1.2284 0.529 20098

Optimal intervention (max expected utility) for k=25000: Vaccination

BCEA is now available from CRAN - to install type install.packages("BCEA") in your R terminal! Follow this space - more examples & tutorials coming! The development version (available for download from this webpage) can be installed directly by typing install.packages("http://www.statistica.it/gianluca/BCEA/BCEA_2.2-4.tar.gz", repos=NULL, type="source", dependencies=TRUE)

New features available in release 2.0
  • Implements the methods for fast computation of the expected value of partial information (EVPPI) of Strong and Oakley and of Sadatsafavi et al
  • Implements graphical outputs both using the base and the ggplot2 packages. The user can choose which option is preferred and obtain (and modify) the graphs accordingly.
  • Implements the analysis of multiple treatments producing an overall cost-effectiveness acceptability curve showing the individual treatment probability of being the most cost-effective option.
  • Includes more details for the vaccine example, discussed here and here.

New features available in release 2.1-1
  • Implements the function to compute the Expected Value of Partial Perfect Information (EVPPI) based on the SPDE-INLA method described here. This substitutes the old functions implemented for the EVPPI computations.
  • Allows the user to select limits for the x- and y-axis in the functions contour, contour2 and ceplane.plot.

Implications of the changes in the R2jags package (since version 0.03-11)
A discussion of the impact of changes in the R2jags package and solutions to keep using it in conjunction to BCEA is here.

New features available in release 2.2-3
  • Implements the analysis of the Expected Value of Partial Information (EVPPI), based on Heath et al (2016), in addition to other methods based on Generalised Additive Models and Gaussian Process regression (Strong et al, 2014). 
  • Includes a graphical tool to describe the individual impact of each parameter on the overall uncertainty in the decision-making process. This is called the "info-rank plot" and is a generalisation of Tornado plots, based on the EVPPI.

  • BCEA manual for release 2.0 (R style with description of each function)
  • BCEA: an R package to run Bayesian cost-effectiveness analysis: worked examples of health economic application, with step-by-step guide to the implementation of the analysis in R
    • Utils.R: script containing some utility functions, used to estimate the parameters of suitable distributions to obtain given values for its mean and standard deviation
    • LoadData.R: contains the commands needed to compute and load the values of the hyper-parameters that define the prior distributions for the first example
    • RunJags.R: contains the commands needed to interface R and JAGS so that the MCMC model for the first example can be run and the resulting posterior distributions can be stored in the R workspace
    • vaccineJags.txt: contains the JAGS code with the distributional assumptions used in the model for the first example
    • vaccine.RData: contains the results of the MCMC model and can be used to run the health economic analysis for the first example, without re-running the Bayesian model in JAGS
    • MTCmodel.txt:contains the JAGS code with the distributional assumptions used in the model for the second example
    • MTC.RData: contains the results of the MCMC model and can be used to run the health economic analysis for the second example, without re-running the Bayesian model in JAGS
  • R script to execute the analysis of the Expected Value of Partial Information for the health economic example presented in chapters 3 and 4 of BMHE (the code in this file is just the first part of the more extensive file HEexample.R, which also computes the EVPPI using the 2-stage approach). Either download the script or simply run it from an R terminal using the command source(url("http://www.statistica.it/gianluca/BCEA/ExampleEVPPI.R"))The resulting comparative graph is hereThe analysis can be extended to all the parameters involved in the model. For example, the command x.all <- evppi(inp$parameters,inp$mat,m,n.blocks=50) will repeat the analysis (in this case using Strong & Oakley's algorithm) computing the EVPPI for each parameter separately. The resulting graph can be produced by typing the command plot(x.all). NB: These methods are superseded by more efficient algorithms based on non-parametric regression (notably Gaussian Processes regression). New examples will be implemented soon!