Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Time Series Analysis and Control Examples

Kalman Filter Subroutines

This section describes a collection of Kalman filtering and smoothing subroutines for time series analysis; immediately following are three examples using Kalman filtering subroutines. The state space model is a method for analyzing a wide range of time series models. When the time series is represented by the state space model (SSM), the Kalman filter is used for filtering, prediction, and smoothing of the state vector. The state space model is composed of the measurement and transition equations. The measurement (or observation) equation can be written

y_t = b_t + H_t z_t + \epsilon_t
where bt is an Ny ×1 vector, Ht is an Ny ×Nz matrix, the sequence of observation noise \epsilon_t is independent, zt is an Nz ×1 state vector, and yt is an Ny ×1 observed vector.

The transition (or state) equation is denoted as a first-order Markov process of the state vector.

z_{t+1} = a_t + F_t z_t + \eta_t
where at is an Nz ×1 vector, Ft is an Nz ×Nz transition matrix, and the sequence of transition noise \eta_t is independent. This equation is often called a shifted transition equation because the state vector is shifted forward one time period. The transition equation can also be denoted using an alternative specification
z_t = a_t + F_t z_{t-1} + \eta_t
There is no real difference between the shifted transition equation and this alternative equation if the observation noise and transition equation noise are uncorrelated, that is, E(\eta_t \epsilon^'_t) = 0. It is assumed that
E(\eta_t \eta^'_s) & = & V_t \delta_{ts} \E(\epsilon_t \epsilon^'_s) & = & R_t \delta_{ts} \E(\eta_t \epsilon^'_s) & = & G_t \delta_{ts} \
where
\delta_{ts} = \{ 1 & { if } t = s \ 0 & { if } t \neq s
 .
De Jong (1991a) proposed a diffuse Kalman filter that can handle an arbitrarily large initial state covariance matrix. The diffuse initial state assumption is reasonable if you encounter the case of parameter uncertainty or SSM nonstationarity. The SSM of the diffuse Kalman filter is written
y_t & = & X_t \beta + H_t z_t + \epsilon_t \z_{t+1} & = & W_t \beta + F_t z_t + \eta_t \z_0 & = & a+ A\delta \\beta & = & b+ B\delta
where \delta is a random variable with a mean of \mu and a variance of \sigma^2\Sigma. When \Sigma arrow \infty, the SSM is said to be diffuse.

The following IML Kalman filter calls are supported:

KALCVF
performs covariance filtering and prediction

KALCVS
performs fixed-interval smoothing

KALDFF
performs diffuse covariance filtering and prediction

KALDFS
performs diffuse fixed-interval smoothing
The KALCVF call computes the one-step prediction z_{t+1| t} and the filtered estimate z_{t| t}, together with their covariance matrices P_{t+1| t} and P_{t| t}, using forward recursions. You can obtain the k-step prediction z_{t+k| t} and its covariance matrix P_{t+k| t} with the KALCVF call. The KALCVS call uses backward recursions to compute the smoothed estimate z_{t| T} and its covariance matrix P_{t| T} when there are T observations in the complete data.

The KALDFF call produces one-step prediction of the state and the unobserved random vector \delta as well as their covariance matrices. The KALDFS call computes the smoothed estimate z_{t| T} and its covariance matrix P_{t| T}.

See Chapter 17, "Language Reference," for more information about Kalman filtering subroutines.


Example 10.2: Kalman Filtering: Likelihood Function Evaluation

Example 10.3: Kalman Filtering: Estimating an SSM Using the EM Algorithm

Example 10.4: Diffuse Kalman Filtering

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.