Abstract

State space modelling is an efficient and flexible method for statistical inference of a broad class of time series and other data. This paper describes an R package KFAS for state space modelling with the observations from an exponential family, namely Gaussian, Poisson, binomial, negative binomial and gamma distributions. After introducing the basic theory behind Gaussian and non-Gaussian state space models, an illustrative example of Poisson time series forecasting is provided. Finally, a comparison to alternative R packages suitable for non-Gaussian time series modelling is presented.

Highlights

  • State space models offer a unified framework for modeling several types of time series and other data

  • Structural time series, autoregressive integrated moving average (ARIMA) models, simple regression, generalized linear mixed models, and cubic spline smoothing are just some examples of the statistical models which can be represented as a state space model

  • Assuming that the prior distribution of β is defined as diffuse, the diffuse likelihood of this state space model corresponds to a restricted maximum likelihood (REML)

Read more

Summary

Introduction

State space models offer a unified framework for modeling several types of time series and other data. Petris and Petrone (2011) and Tusell (2011) introduce and review some of the contributed R (R Core Team 2017) packages available on the Comprehensive R Archive Network (CRAN) for Gaussian state space modeling. Several new additions have emerged on CRAN Most of these packages use one package or multiple packages reviewed in Tusell (2011) for filtering and smoothing and add new user interfaces and functionality for certain types of models. In this paper we first introduce the basic theory related to state space modeling, and proceed to show the main aspects of KFAS in more detail, illustrate its functionality by applying it to real life datasets, and make a short comparison between KFAS and other potentially useful packages for non-Gaussian time series modeling

The Gaussian state space model
Log-likelihood of the Gaussian state space model
Example of a Gaussian state space model
State space models for the exponential family
Log-likelihood of the non-Gaussian state space model
Example of non-Gaussian state space model
Residuals
Functionality of KFAS
Constructing common state space models with KFAS
Structural time series
ARIMA models
Linear and generalized linear models
Generalized linear mixed models
Arbitrary state space models
Illustration
Other packages for non-Gaussian time series modeling
Comparison to INLA
Discussion
Filtering and smoothing recursions
Filtering
Smoothing

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.