BCEA is a R library specifically designed to postprocess 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 t_{1} more "costeffective" than the standard intervention t_{0}? BCEA 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, here, here and here). A discussion of the changes in release 2.0 is here.
A stable version 2.2 is now available on CRAN; a beta release 2.22 (including some features under testing) can be downloaded here (tar.gz) or here (.zip).
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 CostEffectiveness 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)
Costeffectiveness 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(url( "http://www.statistica.it/gianluca/BCEA_2.21.tar.gz"), repos=NULL, type="source")
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 costeffectiveness acceptability curve showing the individual treatment probability of being the most costeffective 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 SPDEINLA method described here. This substitutes the old functions implemented for the EVPPI computations.
 Allows the user to select limits for the x and yaxis in the functions contour, contour2 and ceplane.plot.
Implications of the changes in the R2jags package (since version 0.0311) A discussion of the impact of changes in the R2jags package and solutions to keep using it in conjunction to BCEA is here.
Downloads
 BCEA manual for release 2.0 (
R style with description of each function)
 BCEA: an R package to run Bayesian costeffectiveness analysis: worked examples of health economic application, with stepbystep 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 hyperparameters 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 rerunning 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 rerunning 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 2stage 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 here. The 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 nonparametric regression (notably Gaussian Processes regression). New examples will be implemented soon!
