Abstract

nimble is an R package for constructing algorithms and conducting inference on hierarchical models. The nimble package provides a unique combination of flexible model specification and the ability to program model-generic algorithms. Specifically, the package allows users to code models in the BUGS language, and it allows users to write algorithms that can be applied to any appropriate model. In this paper, we introduce the nimbleSMC R package. nimbleSMC contains algorithms for state-space model analysis using sequential Monte Carlo (SMC) techniques that are built using nimble. We first provide an overview of state-space models and commonly-used SMC algorithms. We then describe how to build a state-space model in nimble and conduct inference using existing SMC algorithms within nimbleSMC. SMC algorithms within nimbleSMC currently include the bootstrap filter, auxiliary particle filter, ensemble Kalman filter, IF2 method of iterated filtering, and a particle Markov chain Monte Carlo (MCMC) sampler. These algorithms can be run in R or compiled into C++ for more efficient execution. Examples of applying SMC algorithms to linear autoregressive models and a stochastic volatility model are provided. Finally, we give an overview of how model-generic algorithms are coded within nimble by providing code for a simple SMC algorithm. This illustrates how users can easily extend nimble's SMC methods in high-level code.

Highlights

  • State-space models provide a framework for analyzing time-series data, where observations are assumed to be noisy measurements of unobserved latent states that evolve over time (Durbin and Koopman 2012)

  • Attempts have been made at creating proposal distributions that account for these correlations, as in Pooley, Bishop, and Marion (2015) and Newman, Fernández, Thomas, and Buckland (2009), but applying generic Markov chain Monte Carlo (MCMC) algorithms to state-space models does not always work efficiently

  • Newer variations of the ensemble Kalman filter (EnKF) exist that may perform better for some models, such as the Ensemble Adjusted Kalman Filter (Anderson 2001), we have provided only a basic version the EnKF algorithm in nimbleSMC

Read more

Summary

Introduction

State-space models provide a framework for analyzing time-series data, where observations are assumed to be noisy measurements of unobserved latent states that evolve over time (Durbin and Koopman 2012). When a new data point is received, the particles are updated via SIR to represent the filtering distribution given the most current data In this manner, SMC methods can be used to perform “on-line” inference. NimbleSMC’s SMC algorithms are described in detail Because they are all written in nimble’s algorithm programming system, they can be readily inspected and modified by users, much the way many base R functions are written in R. nimble has a variety of MCMC algorithms for more general Bayesian inference, as well as an MCEM (Monte Carlo expectationmaximization) algorithm. The ability to try such different methods on the same models is distinct from other packages, such as WinBUGS and OpenBUGS (Lunn et al 2000, 2012), JAGS (Plummer 2003), and Stan (Carpenter et al 2017) It means, for example, that particle MCMC algorithms in nimble can harness nimble’s MCMC implementations

State-space models
Filtering algorithms
Bootstrap filter
Auxiliary particle filter
IF2 algorithm
Particle MCMC methods
Ensemble Kalman filter
Creating and manipulating models in nimble
Filtering given fixed parameters
Inference on models with unknown parameters
Tuning PMCMC
Tuning IF2
Programming SMC algorithms in nimble
Conclusion
Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.