## Friday, 21 June 2013

### The pretender

Tonight I'll pretend to still be very, very young and go catch a Ryanair flight from Stansted, so that I can be all revenge-y at my brother's stag do, tomorrow morning.

I have pointedly avoided Ryanair for quite a while now, on the grounds that as you grow "less younger", you deserve a bit better quality (although most of the times I end up flying Easyjet, which are hardly the most comfy airlines around... But at least they fly from much closer to my home).

But, ubi maior... I will leave tonight at about 3am so that I can be in the Cambridgeshire countryside with hopefully some time to spare before they board my flight. Then, I'll be finally reunited with the travelling part of my family (I can't be sure at this point, but I seem to remember having wife & kid, although, they have decided a few weeks ago to abandon me to my own devices and flee the English winter in search for better climates).

### Bayes 250 - as it happened

I was going to post some impressions on the two-day Bayes 250 conference, but Christian beat me to it with his perfect recollection of the event.
I thought it was a good workshop with interesting talks and an occasion for camaraderie. I enjoyed being there and I agree with Christian that Dennis Lindley's interview is something we Bayesian should use as promotional material!

## Tuesday, 18 June 2013

### BCEA 1.3.0

After months of work (although to be fair, we haven't worked 100% full time on this), Andrea and I are nearly ready to publish the next release of BCEA

Andrea has done a brilliant job and is responsible for most of the good new features (NB: see what I'm doing here? Subtly putting the blame on him if things go tits up, but also appearing like a magnanimous supervisor who's only pretending not to deserve full credit, if they don't...)

But, seriously, I really mean that he's been brilliant, especially since he had to put up with my being extremely picky on details like font size and similar! Anyway, we're really excited (well, at least as excited as you can be about a computer package) about the new features, which basically are of three types.

1. The first one is in terms of the graphical capabilities of the package. We have implemented all the graphical functions in ggplot2, which now complements the base graphical engine.
2. The second one is that we have included the possibility of running multiple health economic comparisons in a single evaluation. In the current version of BCEA, you are allowed to have many interventions, but the comparisons are performed pairwise against one of them, which the user defines as the "reference" intervention. Now, it will be possible to produce an analysis of all the interventions jointly. This has clear links with multiple treatment comparisons (as pointed out in chapter 9 here).
3. The third new feature allows the user to compute the expected value of partial information (EVPPI), with respect to one of the parameters included in the model. This is a very important aspect of the process of probabilistic sensitivity analysis and normally is performed using a two-stage MCMC process (which is explained in chapter 3 and 4 of BMHE). But this can be (and nearly always is) a very computationally intensive process. Also, you can't use too few iterations in either of the two MCMC stages, because that has a crucial impact on the precision of the results. Also, it is difficult to standardise the analysis using the two-stage MCMC approach, because it depends very much on the model being fitted. However, Mohsen Sadatsafavi and colleagues have recently published a paper in which they found a clever way of approximating the EVPPI, once the original model has been run (ie with a single MCMC step, which you would do anyway). I wasn't aware of the paper, but after Mohsen contacted me and pointed it out, I decided we should implement it in BCEA.
I'm not completely sold on the ggplot2 thing. I think it can be very good and gives you a lot of freedom and flexibility. But sometimes it feels like overkilling it, really. But, for example, it will be helpful in problems with multiple interventions, where it is more important that the user can customise the resulting graphs, given that they can be very cluttered, if there are many interventions being compared at the same time (at the moment we allow a maximum of 6).

In the next couple of days we'll release the new version as some sort of beta test. We have done some tests ourselves, of course, and everything seems to work OK. But of course it would be good if we could get more feedbacks on different problems.

## Thursday, 13 June 2013

### Big in Japan

Inspired by this post on R-bloggers, I decided to check how BCEA was doing. Unfortunately, it does not feature in the top 100 most downloaded R packages. However, I think it's doing well $-$ considering the book (which is the main medium of advertising of the package) has been out for only a few months (since October last year) and it's kind of a specialised software, which basically you only need if you do health economic evaluations...

I've used some simple R code to download the log files containing all hits to http://cran.rstudio.com/ since October of 2012. Once the files (in .csv format, compressed in .gz files, one per each day) are downloaded, I have R extract the original file and then create a table, only selecting the records for BCEA.

The resulting dataset contains the date(s) and time(s) in which the library has been downloaded from CRAN, some information about the R version and architecture of the person who has downloaded the package, as well as their country.

Overall, BCEA has been officially downloaded 862 times (I suppose I should have a big celebration as soon as I hit 1000); most of the times, the download was from a user in the US (185). Surprisingly, BCEA is big in Japan (135 downloads). I did not see this coming, I have to say, but 日本ありがとう$-$ that's "thank you Japan", for those of you who can't speak Japanese (or can't use Google Translate).

Here's the (quickly prepared and hence not particularly elegant, nor necessarily super-efficient) code to download and format the data:
start <- as.Date('2012-10-01')
today <- as.Date('2013-06-12')
all_days <- seq(start, today, by = 'day')
year <- as.POSIXlt(all_days)$year + 1900 urls <- paste0('http://cran-logs.rstudio.com/', year, '/', all_days, '.csv.gz') file <- basename(urls) download.file(urls[1], file[1]) data <- read.table(gzfile(file[1]),sep=",",header=TRUE) data <- data[data$package=="BCEA",]
for (i in 2:length(urls)) {