Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
131 tokens/sec
GPT-4o
10 tokens/sec
Gemini 2.5 Pro Pro
47 tokens/sec
o3 Pro
4 tokens/sec
GPT-4.1 Pro
38 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

kDGLM: a R package for Bayesian analysis of Generalized Dynamic Linear Models (2403.13069v1)

Published 19 Mar 2024 in stat.ME and stat.CO

Abstract: 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.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (32)
  1. k-parametric dynamic generalized linear models: a sequential approach via information geometry.
  2. Amari, S.-i. (2016). Information Geometry and Its Applications. Springer Publishing Company, Incorporated, 1st edition.
  3. Discount bayesian multiprocess modelling with cusums. In Anderson, O., editor, Time Series Analysis: Theory and Practice 5. North-Holland, Amsterdam.
  4. Hierarchical modeling and analysis for spatial data. Chapman and Hall/CRC.
  5. Correction: Evaluating epidemic forecasts in an interval format. PLOS Computational Biology, 18(10):1–3.
  6. An efficient sequential approach for joint modelling of multiple time series.
  7. A simple and efficient simulation smoother for state space time series analysis. Biometrika, 89(3):603–15.
  8. Frühwirth-Schnatter, S. (1994). Data augmentation and dynamic linear models. Journal of Time Series Analysis, 15(2):183–202.
  9. Gamerman, D. (1998). Markov chain Monte Carlo for dynamic generalised linear models. Biometrika, 85(1):215–227.
  10. A non-Gaussian family of state-space models with exact marginal likelihood. Journal of Time Series Analysis, 34(6):625–645.
  11. Bayesian forecasting. Journal of the Royal Statistical Society. Series B (Methodological), 38(3):205–247.
  12. Helske, J. (2017). KFAS: Exponential family state space models in R. Journal of Statistical Software, 78(10):1–39.
  13. Another look at measures of forecast accuracy. International Journal of Forecasting, 22(4):679–688.
  14. Kalman, R. E. (1960). A new approach to linear filtering and prediction problems. Transactions of the ASME–Journal of Basic Engineering, 82(Series D):35–45.
  15. FKF: Fast Kalman Filter. https://waternumbers.github.io/FKF/, https://github.com/waternumbers/FKF.
  16. Marotta, R. (2018). Revisiting dlm for p𝑝pitalic_p-dimensional exponential family. Master’s thesis, Universidade Federal do Rio de Janeiro, RJ BR.
  17. Ministry of Health, Brazil (2023). DATASUS - department of informatics of the unified health system. http://datasus.saude.gov.br. Accessed: June 9, 2023.
  18. Generalized linear models. Journal of the Royal Statistical Society, Series A, General, 135:370–384.
  19. Petris, G. (2010). An R package for dynamic linear models. Journal of Statistical Software, 36(12):1–16.
  20. Dynamic Linear Models with R. useR! Springer-Verlag, New York.
  21. Bayesian Graphical Models using MCMC. R package version 4-15.
  22. Impact of the covid-19 pandemic on hospital admissions for cardiovascular diseases in a large brazilian urban center. Revista da Sociedade Brasileira de Medicina Tropical, 55:e0264–2021.
  23. Approximate Bayesian inference for latent Gaussian, models using integrated nested Laplace approximations (with discussion)). Journal of the Royal Statistical Society B, 71:319–392.
  24. R-INLA: The R-INLA package for approximate Bayesian inference using integrated nested Laplace approximation. R package version 24.02.09.
  25. The handling of overdispersion on poisson regression model with the generalized poisson regression model. AIP Conference Proceedings, 2326(1):020026.
  26. A poisson-multinomial spatial model for simultaneous outbreaks with application to arboviral diseases. Statistical Methods in Medical Research, 31(8):1590–1602. PMID: 35658776.
  27. Conditional Autoregressive (CAR) Model, pages 1–11. John Wiley & Sons, Ltd.
  28. Scott, S. L. (2024). bsts: Bayesian Structural Time Series. R package version 0.9.10.
  29. Likelihood analysis of non-Gaussian measurement time series. Biometrika, 84(3):653–67.
  30. Stan Development Team (2023). RStan: the R interface to Stan. R package version 2.32.3.
  31. Bayesian Forecasting and Dynamic Models (Springer Series in Statistics). Springer-Verlag.
  32. Dynamic generalized linear models and bayesian forecasting. Journal of the American Statistical Association, 80(389):73–83.

Summary

We haven't generated a summary for this paper yet.