The RBATS package is an R package that provides routines for sequential inference within the class of univariate Normal Bayesian Dynamic Models. Much of the code is based on the descriptions from West and Harrison (1997).
The main idea behind the package is that it implements Bayesian Dynamic Models, maintaining Bayesian sequential inference while keeping a lightweight structure with fewer dependencies.
In the current version, I translated the main functions,
forward_filter_dlm
and backward_smoother_dlm
, to C++
using the
Rcpp
and RcppArmadillo
interfaces.
You can install the development version from GitHub with:
if (!require(remotes)) install.packages('remotes')
remotes::install_github("AndrMenezes/RBATS")
I mainly wrote RBATS for use in routine data analysis and for learning purposes.
I drew inspiration from the great PyBATS
python package by
Isaac Lavine and
Andrew Cron.
-
v0.2.1: Translated the main code to
C++
, included new non-linear DLM models and aforecast
method fordlm.fit
objects. -
v0.1.0: First release version written in
R
and used in Migon et al. (2023).
Other R packages that can be used for Dynamic Linear Model or also known State Space Models are: