Grocer Function

NAME

kalman - Kalman filter estimation

CALLING SEQUENCE

[rkalman]=kalman(func,y,x,z,F,param,varargin)

PARAMETERS

Input

Output

DESCRIPTION

Maximum likelihood estimation of a kalman model:          y(t) = X(t)*B(t) + Z(t)*A + e(t), e(t) = N(0,R)          B(t) = Z(t) .TP B(t-1) + v(t),    v(t) = N(0,Q)

EXAMPLE

rtvp=kalman(grocer_func,grocer_y,grocer_x,grocer_ik,grocer_param,'priorb0=grocer_priorb0','priorv0=grocer_priorv0','meth=grocer_optmeth',varargin(:)) This example is taken from tvp. Here grocer_func is one of the 4 following cases: 1) '[Q,R]=tvp_param1(grocer_param)' 2) '[Q,R]=tvp_param1a(grocer_param)' 3) '[Q,R,grocer_priorb0]=tvp_param2(param)' 4) '[Q,R,grocer_priorb0]=tvp_param2a(param)'; grocer_y is the vector of endogenous variables, grocer_x the matrix of exogenous variables; grocer_ik is the (kxk) identity matrix; grocer_param is a vector of starting values, either given b the user or calculated as the ols regression of y on x; grocer_priorb0, grocer_priorv0 and grocer_optmeth are either the values given by the user or the default values; lastly, varargin are the option for maxlik, if any, given by he user. 

AUTHOR

Eric Dubois 2002