This manuscript introduces an R package called trialr that implements a collection of clinical trial methods in Stan and R. In this article, we explore three methods in detail. The first is the continual reassessment method for conducting phase I dose-finding trials that seek a maximum tolerable dose. The second is EffTox, a dose-finding design that scrutinises doses by joint efficacy and toxicity outcomes. The third is the augmented binary method for modelling the probability of treatment success in phase II oncology trials with reference to repeated measures of continuous tumour size and binary indicators of treatment failure. We emphasise in this article the benefits that stem from having access to posterior samples, including flexible inference and powerful visualisation. We hope that this package encourages the use of Bayesian methods in clinical trials.
I became aware of Stan whilst working on some Bayesian clinical trial designs.
I recall using Monte Carlo integration to resolve six-dimensional integrals to estimate posterior means and thinking that there must be a better way.
In fact, there were probably many better ways.
However, I doubt any would be as good as Stan, a probabilistic programming language and Hamiltonion Monte Carlo Markov Chain sampler.
This manuscript is my first sole-author attempt at research.
It was particularly pleasing to implement James Wason and Shaun Seaman's augmented binary method, an approach that will surely feature strongly if we are to wean ourselves off information-light binary response variables.
trial is on CRAN.