Previous Page | Next Page

Language Reference

KALDFF Call

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:

data

is a matrix that contains data .

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 that contains fixed matrices for the time-variant model in the transition equation and the measurement equation—that is, .

coef

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, .

var

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, .

intd

is an vector that contains the intercept term in the equation for the initial state vector and the mean effect —that is, .

coefd

is an matrix that contains coefficients for the initial state in the equation for the initial state vector and the mean effect —that is, .

n0

is an optional scalar including an initial denominator. If , the denominator for is plus the number of elements of . If or is not specified, the denominator for is . With , the initial values, , and , are assumed to be known and, hence, , , and are used for input that contains the initial values. If the value of is negative or is not specified, the initial values for , , and are computed. The value of is updated as after the KALDFF call.

at

is an optional matrix. If , contains . However, only the first matrix is used as input. When you specify the KALDFF call, returns . If is negative or the matrix contains missing values, is automatically computed.

mt

is an optional matrix. If , contains . However, only the first matrix is used as input. If is negative or the matrix contains missing values, 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 .

qt

is an optional matrix. If , contains . However, only the first matrix is used as input. If is negative or the matrix contains missing values, 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:

pred

is a matrix that contains estimated predicted state vectors .

vpred

is a matrix that contains estimated mean square errors of predicted state vectors .

initial

is an matrix that contains an estimate and its variance for initial state , that is, .

s2

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, , , , , , , , , , , 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 -step forecasting where , the estimated conditional expectation at time is computed with observations given up to time . The estimated -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 , initial values are set as follows:

     
     
     

For -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.

Previous Page | Next Page | Top of Page