KALCVF Call
- CALL KALCVF( pred, vpred, filt, vfilt, data, lead,
a, f, b, h,
- var <, z0, vz0>);
The KALCVF call computes the one-step prediction
and the filtered estimate
, as well as their covariance matrices.
The call uses forward recursions, and you
can also use it to obtain k-step estimates.
The inputs to the KALCVF subroutine are as follows:
- data
- is a T ×Ny matrix containing data
(y1, ... , yT)'.
- lead
- is the number of steps to forecast after the end of the data.
- a
- is an Nz ×1 vector for a time-invariant input vector in
the transition equation, or a (T+ lead)Nz ×1
vector containing input vectors in the transition equation.
- f
- is an Nz ×Nz matrix for a time-invariant
transition matrix in the transition equation, or a
(T+ lead)Nz ×Nz matrix containing
transition matrices in the transition equation.
- b
- is an Ny ×1 vector for a time-invariant input vector in
the measurement equation, or a (T+ lead)Ny ×1
vector containing input vectors in the measurement equation.
- h
- is an Ny ×Nz matrix for a time-invariant
measurement matrix in the measurement equation, or a
(T+ lead)Ny ×Nz matrix containing
measurement matrices in the measurement equation.
- var
- is an (Ny + Nz) ×(Ny + Nz) matrix for a
time-invariant variance matrix for the error in the transition
equation and the error in the measurement equation, or a
(T+ lead)(Ny + Nz) ×(Ny + Nz) matrix
containing variance matrices for the error in the transition
equation and the error in the measurement equation,
that is, .
- z0
- is an optional 1 ×Nz initial
state vector .
- vz0
- is an optional Nz ×Nz covariance
matrix of an initial state vector .
The KALCVF call returns the following values:
- pred
- is a (T+ lead) ×Nz matrix containing
one-step predicted state vectors .
- vpred
- is a (T+ lead)Nz ×Nz matrix
containing mean square errors of predicted state
vectors .
- filt
- is a T ×Nz matrix containing filtered state
vectors .
- vfilt
- is a TNz ×Nz matrix containing mean square errors of
filtered state vectors .
The KALCVF call computes the conditional expectation of the
state vector zt given the observations, assuming that the
mean and the variance of the initial state vector are known.
The filtered value is the conditional expectation of the
state vector zt given the observations up to time t.
For k-step forecasting where k>0, the conditional expectation
at time t+k is computed given observations up to t.
For notation, Vt and Rt are variances of
and , respectively, and Gt
is a covariance of and .A- stands for the generalized inverse of A.
The filtered value and its covariance matrix are
denoted and , respectively.
For k>0, and stand for the
k-step forecast of zt+k and its mean square error.
The Kalman filtering algorithm for one-step
prediction and filtering is given as follows:
And for k-step forecasting for k>1,
When you use the alternative transition equation
the forward recursion algorithm is written
And for k-step forecasting (k>1),
You can use the KALCVF call when you specify the
alternative transition equation and Gt = 0.
The initial state vector and its covariance
matrix of the time invariant Kalman filters
are computed under the stationarity condition
where F and V are the time invariant transition
matrix and the covariance matrix of transition equation noise,
and vec(V) is an Nz2 ×1 column vector that is
constructed by the stacking Nz columns of matrix V.
Note that all eigenvalues of the matrix F are
inside the unit circle when the SSM is stationary.
When the preceding formula cannot be applied, the initial
state vector estimate is set to a1 and
its covariance matrix is given by 106I.
Optionally, you can specify initial values.
The KALCVF call allows missing values in observations.
If there is a missing observation, the filtered state vector
for the missing observation is given by the one-step forecast.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.