R code accompanying the paper "The Barker proposal: combining robustness and efficiency in gradient-based MCMC" by Livingstone and Zanella (2020)
The file "functions.R" contains the functions implementing the MCMC algorithm under comparison in the simulation study of the paper (namely Random Walk, MALA and the Barker scheme). See BarkerScheme.R for a short implementation of the Barker scheme.
The other files allow to reproduce parts of the simulations and plots reported in the paper.