Contents

About SsfPack In detail Download Documentation Examples Durbin and Koopman book Commandeur and Koopman book

External links

Ox OxMetrics STAMP Econometric Links

State space models and SsfPack

State space models provide a unified framework for modelling and estimating a wide range of time series. The distinguishing feature of state space time series models is that observations are regarded as made up of distinct components such as trend, seasonal, regression elements and disturbence terms, each of which is modelled separately. The techniques that emerge from this approach are very flexible and are capable of handling a much wider range of problems than the main analytical system currently in use for time series analysis, the Box-Jenkins ARIMA system.

SsfPack allows for a full range of different state space forms: from a simple time-invariant model to a complicated multivariate time-varying model. Functions are provided to put standard models such as SARIMA, unobserved components, time-varying regressions and cubic spline models into state space form. Additional features such as explanatory variables, interventions and breakpoints can be added to the models in a straightforeward matter. Basic functions are available for filtering, moment smoothing and simulation smoothing. Ready-to-use functions are provided for standard tasks such as likelihood evaluation, forecasting and signal extraction for both univariate and multivariate series.

SsfPack can be easily used for implementing, fitting and analysing Gaussian models relevant to many areas of econometrics and statistics. Furthermore it provides all relevant tools for the treatment of non-Gaussian and nonlinear state space models. In particular, tools are available to implement simulation based estimation methods such as importance sampling and Markov chain Monte Carlo (MCMC) methods.

Ox and OxMetrics

Ox is an object-oriented statistical system. At its core is a powerful matrix language, which is complemented by a comprehensive statistical library. Among the special features of Ox are its speed, well-designed syntax and editor, and graphical facilities. Ox can read and write many data formats, including spreadsheets, OxMetrics files and Gausstm.

OxMetrics is an interactive graphics-oriented program, which acts as "front-end" to a series of integrated software modules: PcGive, Ox, STAMP, G@RCH and X12Arima. OxMetrics provides a complete separation of the front-end (for data manipulation and visualisation) and the econometric and statistical modules, while maintaining a reliable communication channel, and giving a closely integrated appearance from the user perspective.

SsfPack is a library of routines for estimating state space models in Ox and OxMetrics. It is written in optimised C, which greatly improves the execution speed compared to filtering routines written directly in Ox. This is especially of valuable for likelihood maximisation and simulation studies.

SsfPack Basic and Extended

SsfPack is now available in a Basic and an Extended verion. SsfPack Basic is identical to the classic SsfPack version 2.2. It provides all the functions necessary to estimate an extensive range of state space models.

SsfPack version 3.0 contains both SsfPack Basic and SsfPack Extended, and is the professional version of SsfPack, available as a commercial add-on package in the OxMetrics system.

SsfPack Extended presents (i) an exact treatment for the diffuse initial conditions of linear Gaussian state space models, (ii) computations based on sparse structures in the state space system matrices in order to avoid multiplications by zero and unity values, and (iii) the univariate treatment of filtering and smoothing computations for multivariate state space models. These modifications in SsfPack Extended lead to computationally faster and numerically more stable computations. Furthermore, they imply that the analyses based on large and more complex time series models in a professional setting become feasible.

New ready-to-use functions are added to SsfPack Extended for more advanced and professional analyses of time series. They include functions for likelihood evaluation, signal extraction, computing observation weights, forecasting and bootstrapping. The functions that put ARMA and UC models into state space form are modified to include more general model specifications. The details of the new features in SsfPack Extended are discussed in the manual of SsfPack 3.

Functions in SsfPack Basic

Models in state space form

AddSsfReg() adds regression effects to time-invariant state space
GetSsfArma() puts ARMA model in state space
GetSsfReg() puts regression model in state space
GetSsfSpline() puts nonparametric cubic spline model in state space
GetSsfStsm() puts structural or unobserved components time series model in state space
SsfCombine() combines system matrices of two models
SsfCombineSym() combines symmetric system matrices of two models

General state space algorithms

KalmanFil() returns output of the Kalman filter
KalmanSmo() returns output of the basic smoothing algorithm
SimSmoDraw() returns a sample from the simulation smoother
SimSmoWgt() returns covariance output of the simulation smoother

Likelihood functions

SsfLik() returns log-likelihood function
SsfLikConc() returns profile log-likelihood function
SsfLikSco() returns score vector

Ready-to-use functions

SsfCondDens() returns mean or a draw from the conditional density
SsfMomentEst() returns output from prediction, forecasting and smoothing
SsfRecursion() returns output of the state space recursion

Functions in SsfPack Extended

In addition to the SsfPack Basic functions, SsfPack Extended contains the following new or modified functions:

Models in state space form

GetSsfSarima() puts Seasonal ARIMA model in state space
GetSsfStsm() puts UC model with higher order trends and cycles in state space

General state space algorithms

These use the new more robust filtering algorithms with exact diffuse initialisations.

KalmanFilInit() returns initial output the exact diffuse Kalman filter
KalmanFilEx() returns output of the Kalman filter
KalmanSmoEx() returns output of the basic smoothing algorithm
KalmanFilMeanEx() returns Kalman filter output to implement diffuse initialisation based on augmentation method
KalmanSmoMeanEx() returns Kalman smoother output to implement diffuse initialisation on augmentation method
KalmanFilSmoMeanEx() alternative Kalman smoother output to implement diffuse initialisation on augmentation method

Likelihood functions

These use the new more robust filtering algorithms with exact diffuse initialisations.

SsfLikEx() returns log-likelihood function
SsfLikConcEx() returns profile log-likelihood function
SsfLikScoEx() returns score vector

Ready-to-use functions

These use the new more robust filtering algorithms with exact diffuse initialisations.

SsfMomentEstEx() returns output from prediction, forecasting and smoothing
SsfCondDensEx() returns mean or a draw from the conditional density
SsfForecast() forecasting function with simplified syntax
SsfWeightsEx() returns observation weights of state and signal estimates
SsfBootstrap() returns bootstrap simulation draws