Very shortly, I’ll upload the newest release of BCEA, my R package to post-process the output of a (Bayesian) health economic model and produce systematic summaries (such as graphs and tables) for a full economic evaluation and probabilistic sensitivity analysis (more posts on this are, in random order, here, here, here and here).
I’ve made changes of two kinds: the first one can go under the header of “cosmetic changes” (like Pietro Rigo, who taught me a couple of courses back in my undergraduate studies, used to say). Basically, I decided to print out the whole script for BCEA and while I was going through it I realised that in several points I wasn’t really being very elegant or particularly effective with my code. This was not a huge problem, I think, because speed of execution is generally not an issue $-$ the inputs to the functions are usually moderately small and the operations required are not too complicated. But, once I realised that, it bothered me that my code was full of loops and unnecessary lines and so I changed it. As it happens, the gains in terms of computational speed are not huge (because of the reason I mentioned earlier). But the cockroach lemma still applies…
The second type of changes could be labelled as “substantial” and involve the following.
- I’ve included a function multi.evppi, which implements the method for multivariate analysis of the expected value of partial perfect information, described here. (The next bit of information is totally irrelevant, but when I went to Edinburgh for the MRC clinical trial conference, I caught up with Mark Strong, who gave a talk on this, which motivated me to finish off the script).
- A utility function called CreateInputs, which can be called to produce the object containing the matrix with the parameters simulated using the MCMC procedure (using JAGS or BUGS) and a vector of parameters (as strings) that can be used to perform the EVPPI analysis.
- I’ve also coded up (borrowing from Mark’s original scripts) a function to perform diagnostic analysis on the assumptions underlying the Gaussian process model that is used to estimate the EVPPI. That’s called diag.evppi.
- A function that performs structural probabilistic sensitivity analysis, which is called struct.psa. I think this was long due, since basically most of the inputs were already there $-$ you only have to run the model using different specifications and save (some of) the results to a list and then this function will compute the weights to be associated with each model specification (according to the methods specified in this paper by Chris Jackson et al.