KALDFF Call
- CALL KALDFF( pred, vpred, initial, s2, data, lead,
int, coef, var,
- intd, coefd <, n0, at, mt,
qt>);
The KALDFF call computes the one-step forecast of state
vectors in an SSM using the diffuse Kalman filter.
The call estimates the conditional expectation of
zt, and it also estimates the initial random
vector,
, and its covariance matrix.
The inputs to the KALDFF 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 set.
- int
- is an
matrix for a time-invariant
fixed matrix, or a
matrix containing fixed matrices for the time-variant
model in the transition equation and the measurement equation,
that is, (W't, X't)'.
- coef
- is an (Ny + Nz) ×Nz matrix for a time-invariant
coefficient, or a (T+ lead)(Ny + Nz) ×Nz
matrix containing coefficients at each time in the
transition equation and the measurement equation,
that is, (F't, H't)'.
- 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 covariance matrices for the error in the transition
equation and the error in the measurement equation, that
is,
.
- intd
- is an
vector containing
the intercept term in the equation for the initial
state vector z0 and the mean effect
,
that is, (a', b')'.
- coefd
- is an
matrix containing
coefficients for the initial state
in the equation
for the initial state vector z0 and the mean effect
, that is, (A', B')'.
- n0
- is an optional scalar including an initial denominator.
If n0>0, the denominator for
is n0 plus the number nt of elements
of (y1, ... , yt)'.
If
or n0 is not specified, the
denominator for
is nt.
With
, the initial values, A1, M1, and
Q1, are assumed to be known and, hence, at, mt,
and qt are used for input containing the initial values.
If the value of n0 is negative or n0 is not specified,
the initial values for at, mt, and qt are computed.
The value of n0 is updated as
max(n0,0) + nt after the KALDFF call.
- at
- is an optional
matrix.
If
, at contains
(A'1, ... , A'k)'.
However, only the first matrix A1 is used as input.
When you specify the KALDFF call, at returns
(A'T-k+ lead+1, ... , A'T+ lead)'.
If n0 is negative or the matrix A1 contains
missing values, A1 is automatically computed.
- mt
- is an optional kNz ×Nz matrix.
If
, mt contains (M1, ... , Mk)'.
However, only the first matrix M1 is used as input.
If n0 is negative or the matrix M1
contains missing values, mt is used for output,
and it contains (MT-k+ lead+1, ... , MT+ lead)'.
Note that the matrix M1 can be used as an input matrix
if either of the off-diagonal elements is not missing.
The missing element M1(i,j) is replaced
by the nonmissing element M1(j,i).
- qt
- is an optional
matrix.
If
, qt contains (Q1, ... , Qk)'.
However, only the first matrix Q1 is used as input.
If n0 is negative or the matrix Q1
contains missing values, qt is used for
output and contains (QT-k+ lead+1, ... , QT+ lead)'.
The matrix Q1 can also be used as an input
matrix if either of the off-diagonal elements is
not missing since the missing element Q1(i,j)
is replaced by the nonmissing element Q1(j,i).
The KALCVF call returns the following values:
- pred
- is a (T+ lead) ×Nz matrix containing
estimated predicted state vectors
.
- vpred
- is a (T+ lead)Nz ×Nz matrix
containing estimated mean square errors of predicted state
vectors
.
- initial
- is an Nd ×(Nd + 1) matrix containing an
estimate and its variance for initial state
,
that is,
.
- s2
- is a scalar containing the estimated variance
.
The KALDFF call computes the one-step forecast of state
vectors in an SSM using the diffuse Kalman filter.
The SSM for 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](images/i17eq153.gif)
where zt is an Nz ×1 state vector,
yt is an Ny ×1 observed vector, and
![[ \eta_t \
\epsilon_t
]
& \sim & N (0, \sigma^2
[ V_t & G_t \
G^'_t & R_t
]
) \\delta & \sim & N(\mu, \sigma^2\Sigma)](images/i17eq154.gif)
It is assumed that the noise vector
is
independent and
is independent of the vector
.The matrices, Wt, Ft, Xt,
Ht, a, A, b, B, Vt,
Gt, and Rt, are assumed to be known.
The KALDFF call estimates the conditional expectation
of the state vector zt given the observations.
The KALDFF subroutine also produces the estimates of the
initial random vector
and its covariance matrix.
For k-step forecasting where k>0, the
estimated conditional expectation at time t + k
is computed with observations given up to time t.
The estimated k-step forecast and its estimated MSE
are denoted
and
(for k>0).
and
are last-column-deleted submatrices of
At+k and Et, respectively.
The algorithm for one-step prediction is given as follows:
![E_t & = & (X_t B, y_t - X_t b) -
H_t A_t \
D_t & = & H_t M_t H^'_t + R_t
\...
...a,t} & = & \hat{\sigma}^2_t
S^-_t \
K_t & = & (F_t M_t H^'_t +
G_t)D^-_t \](images/i17eq157.gif)
![A_{t+1} & = & W_t(-B, b) + F_t A_t +
K_t{E}_t \
M_{t+1} & = & (F_t - K_t H_t)...
...a}^2_t M_{t+1} +
A_{t+1(\delta)}
\hat{\Sigma}_{\delta,t}
A^'_{t+1(\delta)}](images/i17eq158.gif)
where nt is the number of elements of
(y1, ... ,yt)' plus max(n0,0).
Unless initial values are given and
, initial values are set as follows:
![A_1 & = & W_1(-B,b) + F_1(-A,a) \
M_1 & = & V_1 \
Q_1 & = & 0](images/i17eq159.gif)
For k-step forecasting where k>1,
![A_{t+k} & = & W_{t+k-1}(-B,b) + F_{t+k-1} A_{t+k-1}
\
M_{t+k} & = & F_{t+k-1}...
...igma}^2_t M_{t+k} + A_{t+k(\delta)}
\hat{\Sigma}_{\delta,t}
A^'_{t+k(\delta)}](images/i17eq160.gif)
Note that if there is a missing observation, the
KALDFF call computes the one-step forecast for the
observation following the missing observation as
the two-step forecast from the previous observation.
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.