论文标题
在R学习哈密顿蒙特卡洛
Learning Hamiltonian Monte Carlo in R
论文作者
论文摘要
汉密尔顿蒙特卡洛(HMC)是贝叶斯计算的强大工具。与传统的大都市杂货算法相比,HMC具有更高的计算效率,尤其是在更高的维度或更复杂的建模情况下。但是,对于大多数统计学家来说,HMC的想法来自一个不太熟悉的起源,这是基于古典力学理论的。它通过Stan或其衍生程序之一的实施对初学者来说似乎不透明。我们认为,对HMC的内部工作缺乏了解,这阻碍了其在更广泛的统计问题上的应用。在本文中,我们以统计学家更熟悉的语言回顾了HMC的基本概念,并在R中描述了HMC实现,这是最常用的统计软件环境之一。我们还提出了HMClearn,这是一个用于学习HMC的R包。该软件包包含用于数据分析的通用HMC函数。我们说明了该软件包在常见统计模型中的使用。为此,我们希望推广这种强大的计算工具,以供更广泛的使用。通用统计模型的示例代码作为在线出版物的补充材料。
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 package for learning HMC. This package contains a general-purpose HMC function for data analysis. We illustrate the use of this package in common statistical models. In doing so, we hope to promote this powerful computational tool for wider use. Example code for common statistical models is presented as supplementary material for online publication.