- CALL KALCVF( pred, vpred, filt, vfilt, data, lead,
a, f, b, h,
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.
- var <, z0, vz0>);
The inputs to the KALCVF subroutine are as follows:
The KALCVF call returns the following values:
- is a T ×Ny matrix containing data
(y1, ... , yT)'.
- is the number of steps to forecast after the end of the data.
- 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.
- 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.
- 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.
- 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.
- 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, .
- is an optional 1 ×Nz initial
state vector .
- is an optional Nz ×Nz covariance
matrix of an initial state vector .
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:
- is a (T+ lead) ×Nz matrix containing
one-step predicted state vectors .
- is a (T+ lead)Nz ×Nz matrix
containing mean square errors of predicted state
- is a T ×Nz matrix containing filtered state
- is a TNz ×Nz matrix containing mean square errors of
filtered state vectors .
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.