Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: kalman
See also: gkalfilter gkalsmoother gkallag gkalresiduals

Quantlet: gkalarray
Description: This auxiliary quantlet sets the matrices for a time variable state space model.

Link:
Usage: gkalarrayOut = gkalarray(Y,M,IM,XM)
Input:
Y N_max x TIME matrix of endogenous observations
M If M is a matrix in state equation: K x K with mM variable entries where K is the number of state variables. If M is a matrix in measurement equation: N_max x K with mM variable entries where N_max is the maximal number of observations in Y and K is the number of state variables.
IM Index matrix. If M is a matrix in state equation: K x K matrix. If M is a matrix in measurement equation: N_max x K matrix.
XM Matrix with observations for M_t. If M is a matrix in state equation: mM x TIME matrix. If M is a matrix in measurement equation: mM x TIME matrix.
Output:
gkalarrayOut If M is a matrix in state equation: K x K x TIME array. If M is a matrix in measurement equation: N_max x K x TIME array.

Note:

Example:
library("kalman")
Y  = read("houseprice.dat")
Z  = matrix(3)~0*matrix(3,4)
IZ = 0*matrix(3,2)~(#(1:3)'|#(4:6)'|#(7:9)')
XZ = read("housequality.dat")
Za = gkalarray(Y,Z,IZ,XZ)
Y[,5:6]
Za[,,5:6]

Result:
Contents of _tmp
[1,]     +NAN   32.879
[2,]   32.115   27.465
[3,]    33.99    31.93

Contents of _tmp
[,,1,1,1,1,1,1]
[1,]        1        0     +NAN     +NAN     +NAN
[2,]        1        0 -0.82342  0.032925  0.020662
[3,]        1        0   1.3762  0.021782  0.055013
[,,2,1,1,1,1,1]
[1,]        1        0   1.2248  0.095754 -0.049138
[2,]        1        0  -2.0852 -0.093736    0.129
[3,]        1        0   2.2904  0.047536 -0.000714



Author: R. Schulz, A. Werwatz, 20021120 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006