Learning Hamiltonian Monte Carlo in R
Samuel Thomas, Wanzhu Tu

TL;DR
This paper introduces an accessible R implementation of Hamiltonian Monte Carlo (HMC), aiming to demystify its mechanics for statisticians and promote its wider application in Bayesian analysis.
Contribution
It provides a clear explanation of HMC tailored for statisticians and introduces the hmclearn R package with a general-purpose HMC function for statistical modeling.
Findings
The hmclearn package enables practical HMC application in R.
Illustrations demonstrate HMC's effectiveness in common models.
The approach facilitates broader adoption of HMC in statistical practice.
Abstract
Hamiltonian Monte Carlo (HMC) is a powerful tool for Bayesian computation. In comparison with the traditional Metropolis-Hastings algorithm, HMC offers greater computational efficiency, especially in higher dimensional or more complex modeling situations. To most statisticians, however, the idea of HMC comes from a less familiar origin, one that is based on the theory of classical mechanics. Its implementation, either through Stan or one of its derivative programs, can appear opaque to beginners. A lack of understanding of the inner working of HMC, in our opinion, has hindered its application to a broader range of statistical problems. In this article, we review the basic concepts of HMC in a language that is more familiar to statisticians, and we describe an HMC implementation in R, one of the most frequently used statistical software environments. We also present hmclearn, an R…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMarkov Chains and Monte Carlo Methods · Statistical Methods and Bayesian Inference · Bayesian Methods and Mixture Models
