arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.13069stat.MEstat.CO
收藏

kDGLM:用于广义动态线性模型贝叶斯分析的R包

kDGLM: a R package for Bayesian analysis of Generalized Dynamic Linear Models

Silvaneo V. dos Santos, Mariane Branco Alves, Helio S. Migon

AI总结:

本文介绍R包kDGLM,用于广义动态线性模型的贝叶斯分析,支持多种指数族分布,通过卡尔曼滤波实现高效序贯推断,拟合时间随序列长度线性增长,可快速处理长时间序列及多序列联合建模。

摘要:

本文介绍了kDGLM,这是一个专为广义动态线性模型(GDLM)的贝叶斯分析而设计的R包,主要关注单变量和多变量指数族分布。kDGLM包强调时间序列数据的序贯推断,为拟合、平滑、监测和前馈干预提供了全面支持。kDGLM所采用的方法论(如Alves等人(2024)所提出)与文献中成熟的技术无缝集成,特别是(高斯)动态模型中所使用的技术,包括折扣策略、自回归成分、传递函数等。利用卡尔曼滤波和平滑的关键性质,kDGLM表现出显著的计算效率,使得拟合时间几乎瞬时完成,且与时间序列长度呈线性关系。这一特性使其成为分析长时间序列的极其强大的工具。例如,在建模2010年至2022年巴西因胃肠炎导致的月度医院入院人数时,拟合过程仅耗时0.11秒。即使在模型的空间-时间变体中(27个结果、110个潜在状态和156个月,产生17,160个参数),拟合时间也仅为4.24秒。目前,kDGLM包支持一系列分布,包括单变量正态分布(均值未知、观测方差未知)、双变量正态分布(均值、观测方差和相关性均未知)、泊松分布、伽马分布(形状参数已知、均值未知)和多项分布(试验次数已知、事件概率未知)。此外,kDGLM允许对多个时间序列进行联合建模,前提是每个序列遵循所支持的分布之一。目前正在持续努力以不断扩展所支持的分布。

英文摘要:

This paper introduces kDGLM, an R package designed for Bayesian analysis of Generalized Dynamic Linear Models (GDLM), with a primary focus on both uni- and multivariate exponential families. Emphasizing sequential inference for time series data, the kDGLM package provides comprehensive support for fitting, smoothing, monitoring, and feed-forward interventions. The methodology employed by kDGLM, as proposed in Alves et al. (2024), seamlessly integrates with well-established techniques from the literature, particularly those used in (Gaussian) Dynamic Models. These include discount strategies, autoregressive components, transfer functions, and more. Leveraging key properties of the Kalman filter and smoothing, kDGLM exhibits remarkable computational efficiency, enabling virtually instantaneous fitting times that scale linearly with the length of the time series. This characteristic makes it an exceptionally powerful tool for the analysis of extended time series. For example, when modeling monthly hospital admissions in Brazil due to gastroenteritis from 2010 to 2022, the fitting process took a mere 0.11s. Even in a spatial-time variant of the model (27 outcomes, 110 latent states, and 156 months, yielding 17,160 parameters), the fitting time was only 4.24s. Currently, the kDGLM package supports a range of distributions, including univariate Normal (unknown mean and observational variance), bivariate Normal (unknown means, observational variances, and correlation), Poisson, Gamma (known shape and unknown mean), and Multinomial (known number of trials and unknown event probabilities). Additionally, kDGLM allows the joint modeling of multiple time series, provided each series follows one of the supported distributions. Ongoing efforts aim to continuously expand the supported distributions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑