R code for eHMC
Folder "main" contains executable to run various experiments on NUTS and eHMC
Folder "function" contains the leapfrog integrator, the longestbatch function, empirical distribution of steps and eHMC sampler.
Folder "model" contains of 5 models: Bayesian Logit, Funel distribution, IRT, MVN, SIR, SV. For each model, the file U_grad_U.R contains the function returning the negative log posterior and its gradient and used in eHMC.