Chapter Contents Previous Next
 Language Reference

## 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)'.

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
where zt is an Nz ×1 state vector, yt is an Ny ×1 observed vector, and
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:

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:
For k-step forecasting where k>1,
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.

 Chapter Contents Previous Next Top