论文标题
使用模板构建器的隐藏马尔可夫模型的加速参数和置信区间估计的温和教程
A gentle tutorial on accelerated parameter and confidence interval estimation for hidden Markov models using Template Model Builder
论文作者
论文摘要
估计隐藏马尔可夫模型(HMM)参数的一种非常常见的方法是最大可能性(ML)估计值的相对简单的计算。对于此任务,大多数用户依靠用户友好的估计例程实现,例如统计软件环境R(R Core Team,2021)。这种方法很容易需要耗时的计算,特别是对于更长的观测序列。此外,选择一种适合估计参数置信区间的方法并不完全显而易见(例如,参见,例如,Zucchini等人,2016; Lystig和Hughes,2002; Visser等,2000),通常必须应用计算强度强的引导方法。 在本教程中,我们说明了如何通过R软件包TMB显着加快ML估计的计算。此外,这种方法允许同时简单地检索标准错误。我们使用不同的数据集说明了例程的性能。首先,来自耳鸣患者的移动应用程序中的两个较小的样本,分别具有87和240个数据点的胎儿羔羊运动的众所周知的数据集。其次,我们依靠较大的数据集2000和5000的尺寸模拟数据进行进一步分析。本教程附有一系列脚本,这些脚本都可以在Github上获得。这些脚本允许任何具有适度编程经验的用户从TMB的计算优势中快速受益。
A very common way to estimate the parameters of a hidden Markov model (HMM) is the relatively straightforward computation of maximum likelihood (ML) estimates. For this task, most users rely on user-friendly implementation of the estimation routines via an interpreted programming language such as the statistical software environment R (R Core Team, 2021). Such an approach can easily require time-consuming computations, in particular for longer sequences of observations. In addition, selecting a suitable approach for deriving confidence intervals for the estimated parameters is not entirely obvious (see, e.g., Zucchini et al., 2016; Lystig and Hughes, 2002; Visser et al., 2000), and often the computationally intensive bootstrap methods have to be applied. In this tutorial, we illustrate how to speed up the computation of ML estimates significantly via the R package TMB. Moreover, this approach permits simple retrieval of standard errors at the same time. We illustrate the performance of our routines using different data sets. First, two smaller samples from a mobile application for tinnitus patients and a well-known data set of fetal lamb movements with 87 and 240 data points, respectively. Second, we rely on larger data sets of simulated data of sizes 2000 and 5000 for further analysis. This tutorial is accompanied by a collection of scripts which are all available on GitHub. These scripts allow any user with moderate programming experience to benefit quickly from the computational advantages of TMB.