• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

在R语言中学习哈密顿蒙特卡洛方法。

Learning Hamiltonian Monte Carlo in R.

作者信息

Thomas Samuel, Tu Wanzhu

机构信息

Indiana University School of Medicine.

出版信息

Am Stat. 2021;75(4):403-413. doi: 10.1080/00031305.2020.1865198. Epub 2021 Jan 31.

DOI:10.1080/00031305.2020.1865198
PMID:37465458
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC10353725/
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 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.

摘要

哈密顿蒙特卡罗(HMC)是贝叶斯计算的强大工具。与传统的梅特罗波利斯-黑斯廷斯算法相比,HMC具有更高的计算效率,尤其是在高维或更复杂的建模情况下。然而,对大多数统计学家来说,HMC的概念源于一个不太熟悉的领域,即基于经典力学理论。通过斯坦(Stan)或其衍生程序之一来实现HMC,对于初学者来说可能显得晦涩难懂。我们认为,对HMC内部工作原理的缺乏理解阻碍了它在更广泛的统计问题中的应用。在本文中,我们用统计学家更熟悉的语言回顾了HMC的基本概念,并描述了在R(最常用的统计软件环境之一)中的HMC实现。我们还展示了hmclearn,一个用于学习HMC的R包。这个包包含一个用于数据分析的通用HMC函数。我们说明了该包在常见统计模型中的使用。通过这样做,我们希望推广这个强大的计算工具以供更广泛地使用。常见统计模型的示例代码作为在线发表的补充材料呈现。

相似文献

1
Learning Hamiltonian Monte Carlo in R.在R语言中学习哈密顿蒙特卡洛方法。
Am Stat. 2021;75(4):403-413. doi: 10.1080/00031305.2020.1865198. Epub 2021 Jan 31.
2
Using Hamiltonian Monte Carlo to estimate the log-linear cognitive diagnosis model via Stan.使用 Hamiltonian 蒙特卡罗通过 Stan 估算对数线性认知诊断模型。
Behav Res Methods. 2019 Apr;51(2):651-662. doi: 10.3758/s13428-018-1069-9.
3
Using the Stan Program for Bayesian Item Response Theory.使用斯坦程序进行贝叶斯项目反应理论分析。
Educ Psychol Meas. 2018 Jun;78(3):384-408. doi: 10.1177/0013164417693666. Epub 2017 Feb 1.
4
A review of the Bayesian approach with the MCMC and the HMC as a competitor of classical likelihood statistics for pharmacometricians.为药理学家回顾贝叶斯方法,其中马尔可夫链蒙特卡罗(MCMC)和哈密顿蒙特卡罗(HMC)作为经典似然统计的竞争对手。
Transl Clin Pharmacol. 2023 Jun;31(2):69-84. doi: 10.12793/tcp.2023.31.e9. Epub 2023 Jun 26.
5
A general construction for parallelizing Metropolis-Hastings algorithms.一种并行化 Metropolis-Hastings 算法的通用构造。
Proc Natl Acad Sci U S A. 2014 Dec 9;111(49):17408-13. doi: 10.1073/pnas.1408184111. Epub 2014 Nov 24.
6
Quantum-Inspired Magnetic Hamiltonian Monte Carlo.量子启发式磁哈密顿蒙特卡罗。
PLoS One. 2021 Oct 5;16(10):e0258277. doi: 10.1371/journal.pone.0258277. eCollection 2021.
7
A comparison of computational algorithms for the Bayesian analysis of clinical trials.临床试验贝叶斯分析的计算算法比较。
Clin Trials. 2024 Dec;21(6):689-700. doi: 10.1177/17407745241247334. Epub 2024 May 16.
8
Variational Hamiltonian Monte Carlo via Score Matching.通过得分匹配的变分哈密顿蒙特卡罗方法
Bayesian Anal. 2018 Jun;13(2):485-506. doi: 10.1214/17-ba1060. Epub 2017 Jul 25.
9
Bayesian Inference for Mixed Gaussian GARCH-Type Model by Hamiltonian Monte Carlo Algorithm.基于哈密顿蒙特卡罗算法的混合高斯GARCH类模型的贝叶斯推断
Comput Econ. 2022 Nov 30:1-28. doi: 10.1007/s10614-022-10337-4.
10
Bayesian inference using Hamiltonian Monte-Carlo algorithm for nonlinear joint modeling in the context of cancer immunotherapy.基于 Hamiltonian Monte-Carlo 算法的贝叶斯推断在癌症免疫治疗中的非线性联合建模。
Stat Med. 2020 Dec 30;39(30):4853-4868. doi: 10.1002/sim.8756. Epub 2020 Oct 8.

引用本文的文献

1
Examination of neuromuscular and tissue oxygenation characteristics during submaximal treadmill running with blood flow restriction.在血流限制的次最大强度跑步机跑步过程中对神经肌肉和组织氧合特征的检查。
Eur J Appl Physiol. 2025 Jul 9. doi: 10.1007/s00421-025-05886-z.
2
Stochastic Volatility Models with Skewness Selection.具有偏度选择的随机波动率模型
Entropy (Basel). 2024 Feb 6;26(2):142. doi: 10.3390/e26020142.
3
Bayesian multilevel multivariate logistic regression for superiority decision-making under observable treatment heterogeneity.

本文引用的文献

1
PyMC: a modern, and comprehensive probabilistic programming framework in Python.PyMC:Python 中一个现代且全面的概率编程框架。
PeerJ Comput Sci. 2023 Sep 1;9:e1516. doi: 10.7717/peerj-cs.1516. eCollection 2023.
2
Stan: A Probabilistic Programming Language.斯坦:一种概率编程语言。
J Stat Softw. 2017;76. doi: 10.18637/jss.v076.i01. Epub 2017 Jan 11.
3
Stochastic relaxation, gibbs distributions, and the bayesian restoration of images.随机松弛,吉布斯分布,以及贝叶斯图像恢复。
基于可观测处理异质性的优势决策的贝叶斯多层多变量逻辑回归。
BMC Med Res Methodol. 2023 Oct 5;23(1):220. doi: 10.1186/s12874-023-02034-z.
4
A review of the Bayesian approach with the MCMC and the HMC as a competitor of classical likelihood statistics for pharmacometricians.为药理学家回顾贝叶斯方法,其中马尔可夫链蒙特卡罗(MCMC)和哈密顿蒙特卡罗(HMC)作为经典似然统计的竞争对手。
Transl Clin Pharmacol. 2023 Jun;31(2):69-84. doi: 10.12793/tcp.2023.31.e9. Epub 2023 Jun 26.
IEEE Trans Pattern Anal Mach Intell. 1984 Jun;6(6):721-41. doi: 10.1109/tpami.1984.4767596.
4
Upper respiratory tract disease, force of infection, and effects on survival of gopher tortoises.上呼吸道疾病、感染强度以及对穴居陆龟生存的影响。
Ecol Appl. 2009 Apr;19(3):786-98. doi: 10.1890/08-0219.1.