Chapter Contents |
Previous |
Next |

Language Reference |

**CALL KALDFF(***pred, vpred, initial, s2, data, lead, int, coef, var,*

*intd, coefd <, n0, at, mt, qt>***);**

The inputs to the KALDFF subroutine are as follows:

*data*- is a
*T*×*N*_{y}matrix containing data (**y**_{1}, ... ,**y**_{T})'. *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 (
*N*_{y}+*N*_{z}) ×*N*_{z}matrix for a time-invariant coefficient, or a (*T*+ lead)(*N*_{y}+*N*_{z}) ×*N*_{z}matrix containing coefficients at each time in the transition equation and the measurement equation, that is, (**F**'_{t},**H**'_{t})'. *var*- is an (
*N*_{y}+*N*_{z}) ×(*N*_{y}+*N*_{z}) 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)(*N*_{y}+*N*_{z}) ×(*N*_{y}+*N*_{z}) 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
**z**_{0}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
**z**_{0}and the mean effect , that is, (**A**',**B**')'. *n*0- is an optional scalar including an initial denominator.
If
*n*0>0, the denominator for is*n*0 plus the number*n*_{t}of elements of (**y**_{1}, ... ,**y**_{t})'. If or*n*0 is not specified, the denominator for is*n*_{t}. With , the initial values,**A**_{1},**M**_{1}, and**Q**_{1}, are assumed to be known and, hence,*at*,*mt*, and*qt*are used for input containing the initial values. If the value of*n*0 is negative or*n*0 is not specified, the initial values for*at*,*mt*, and*qt*are computed. The value of*n*0 is updated as max(*n*0,0) +*n*_{t}after the KALDFF call. *at*- is an optional matrix.
If ,
*at*contains (**A**'_{1}, ... ,**A**'_{k})'. However, only the first matrix**A**_{1}is used as input. When you specify the KALDFF call,*at*returns (**A**'_{T-k+ lead+1}, ... ,**A**'_{T+ lead})'. If*n*0 is negative or the matrix**A**_{1}contains missing values,**A**_{1}is automatically computed. *mt*- is an optional
*kN*_{z}×*N*_{z}matrix. If ,*mt*contains (**M**_{1}, ... ,**M**_{k})'. However, only the first matrix**M**_{1}is used as input. If*n*0 is negative or the matrix**M**_{1}contains missing values,*mt*is used for output, and it contains (**M**_{T-k+ lead+1}, ... ,**M**_{T+ lead})'. Note that the matrix**M**_{1}can be used as an input matrix if either of the off-diagonal elements is not missing. The missing element**M**_{1}(*i*,*j*) is replaced by the nonmissing element**M**_{1}(*j*,*i*). *qt*- is an optional matrix.
If ,
*qt*contains (**Q**_{1}, ... ,**Q**_{k})'. However, only the first matrix**Q**_{1}is used as input. If*n*0 is negative or the matrix**Q**_{1}contains missing values,*qt*is used for output and contains (**Q**_{T-k+ lead+1}, ... ,**Q**_{T+ lead})'. The matrix**Q**_{1}can also be used as an input matrix if either of the off-diagonal elements is not missing since the missing element**Q**_{1}(*i*,*j*) is replaced by the nonmissing element**Q**_{1}(*j*,*i*).

The KALCVF call returns the following values:

*pred*- is a (
*T*+ lead) ×*N*_{z}matrix containing estimated predicted state vectors . *vpred*- is a (
*T*+ lead)*N*_{z}×*N*_{z}matrix containing estimated mean square errors of predicted state vectors . *initial*- is an
*N*_{d}×(*N*_{d}+ 1) matrix containing an estimate and its variance for initial state , that is, . *s*2- 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

Chapter Contents |
Previous |
Next |
Top |

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.