BCEs0 is a R library specifically designed to run a full Bayesian cost-effectiveness analysis of individual data in the presence of structural zero costs for some subjects. The framework assumes that data are available for n0 and n1 subjects, that are respectively given some treatment t0 and t1. Typically, costs and clinical benefits should be modelled assuming some form of correlation. But in the case of structural zeros, the model gets even more complicated, since the population average costs need to be computed accounting for the fact that there are two "components" in the population - one made by the individuals who actually accrue some positive cost and the other by the subjects that have no cost.
The package implements the framework developed here (the published paper is freely available under Open Access agreement, while a working paper with a slightly different version of the model is available from here). Basically, there are three modules; the first one (the green square in the graph below) is a pattern mixture model (in the language of missing data) for the chance of each subject being associated with zero costs. The indicator dit takes value 1 if the i-th subject in treatment group t is observed to have 0 costs, and 0 otherwise. The probability it is modelled as a function of an overall average value 0t (and possibly some covariates). The second module (in the red rectangle) is a marginal model for the costs, whose parameters depend on the value taken by dit. When the indicator is 1, then we imply a degenerate distribution on the costs (which ensures that the average cost is estimated to be identically 0). When it is 0, then we imply a non-degenerate distribution (eg a Gamma or a log-Normal). In fact, the population average cost ct is obtained as a mixture of the two components t0 (coming from the non-degenerate distribution) and t1=0, with weights equal to the estimated probability associated with each of the two classes. Finally, the third module (in the blue square) is the conditional model for the measure of effectiveness given the costs. This is defined in terms of a generalised linear regression on the conditional mean t0 which can be re-scaled to obtain the population average for the measure of effectiveness et.
A discussion of the main changes from version 1.0 to 1.1 is here, in the blog. The package has a main function
bces0 will write a JAGS model encoding the distributional assumptions specified by the user for the costs and effectiveness measure and save it into a file model.txt. This can be then used as a "template" and can be modified to account for more complex models (eg including structured effects or different distributional assumptions). If no covariates are specified in data, then only the intercepts 0t will be used to estimate the probability of zero cost, it. If the covariates are given in the data list, bces0 will check if they are centered and if not will compute and use Z = X- E[X] in the pattern mixture model. Then it will use the R library R2jags to run the MCMC model in background using JAGS (which of course needs to be installed - chapter 4 of BMHE describes in details how to make Bayesian analysis using R and JAGS). The results of the Bayesian model are then stored in an R object which is made available to the current workspace and can be then used to perform a full economic analysis, for example using BCEA.
The model file is saved in the current working directory and can then be edited to specify different models/assumptions (eg including individual structured effects or different prior distributions. A R style manual for the package, describing the main characteristics of the package, can be found here. A video of a presentation I gave at the University of Las Palmas (Gran Canaria, Spain) is here.
BCEs0 is now available from CRAN - to install type