CALL KALDFF (pred, vpred, initial, s2, data, lead, int, coef, var, intd, coefd <*>, n0 <*>, at <*>, mt <*>, qt );
The KALDFF subroutine computes the one-step forecast of state vectors in an SSM by using the diffuse Kalman filter. The call estimates the conditional expectation of , and also estimates the initial random vector, , and its covariance matrix.
The input arguments to the KALDFF subroutine are as follows:
is a matrix that contains data .
is the number of steps to forecast after the end of the data set.
is an matrix for a time-invariant fixed matrix, or a matrix that contains fixed matrices for the time-variant model in the transition equation and the measurement equation—that is, .
is an matrix for a time-invariant coefficient, or a matrix that contains coefficients at each time in the transition equation and the measurement equation—that is, .
is an matrix for a time-invariant variance matrix for the error in the transition equation and the error in the measurement equation, or a matrix that contains covariance matrices for the error in the transition equation and the error in the measurement equation—that is, .
is an vector that contains the intercept term in the equation for the initial state vector and the mean effect —that is, .
is an matrix that contains coefficients for the initial state in the equation for the initial state vector and the mean effect —that is, .
is an optional scalar including an initial denominator. If n0, the denominator for is n0 plus the number of elements of . If n0 or n0 is not specified, the denominator for is . With n0, the initial values, , and , are assumed to be known and, hence, at, mt, and qt are used for input that contains 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 after the KALDFF call.
is an optional matrix. If n0, at contains . However, only the first matrix is used as input. When you specify the KALDFF call, at returns . If n0 is negative or the matrix contains missing values, is automatically computed.
is an optional matrix. If n0, mt contains . However, only the first matrix is used as input. If n0 is negative or the matrix contains missing values, mt is used for output, and it contains . Note that the matrix can be used as an input matrix if either of the off-diagonal elements is not missing. The missing element is replaced by the nonmissing element .
is an optional matrix. If n0, qt contains . However, only the first matrix is used as input. If n0 is negative or the matrix contains missing values, qt is used for output and contains . The matrix can also be used as an input matrix if either of the off-diagonal elements is not missing since the missing element is replaced by the nonmissing element .
The KALDFF call returns the following values:
is a matrix that contains estimated predicted state vectors .
is a matrix that contains estimated mean square errors of predicted state vectors .
is an matrix that contains an estimate and its variance for initial state , that is, .
is a scalar that contains the estimated variance .
The KALDFF call computes the one-step forecast of state vectors in an SSM by using the diffuse Kalman filter. The SSM for the diffuse Kalman filter is written
where is an state vector, is an observed vector, and
It is assumed that the noise vector is independent and is independent of the vector . The matrices, , , , , a, A, b, B, , , and , are assumed to be known. The KALDFF call estimates the conditional expectation of the state vector given the observations. The KALDFF subroutine also produces the estimates of the initial random vector and its covariance matrix. For k-step forecasting where , the estimated conditional expectation at time is computed with observations given up to time t. The estimated k-step forecast and its estimated MSE are denoted and (for ). and are last-column-deleted submatrices of and , respectively. The algorithm for one-step prediction is given as follows:
where is the number of elements of plus . Unless initial values are given and n0, initial values are set as follows:
For k-step forecasting where ,
If there is a missing observation, the KALDFF call computes the one-step forecast for the observation that follows the missing observation as the two-step forecast from the previous observation.
An example that uses the KALDFF call is in the documentation for the KALDFS call .