From 7dc077a52d2cbf67008b5ccbae8631b69a785707 Mon Sep 17 00:00:00 2001 From: assia Date: Fri, 11 Jan 2008 15:19:51 +0000 Subject: [PATCH] header updated git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1574 ac1d8469-bf42-47a9-8791-bf33cf982152 --- matlab/DiffuseKalmanSmoother3.m | 40 +++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/matlab/DiffuseKalmanSmoother3.m b/matlab/DiffuseKalmanSmoother3.m index 84a031656..b41768e3b 100644 --- a/matlab/DiffuseKalmanSmoother3.m +++ b/matlab/DiffuseKalmanSmoother3.m @@ -1,5 +1,37 @@ function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf) -%function [a,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf) + +% function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y,trend,pp,mm,smpl,mf) +% Computes the diffuse kalman smoother without measurement error, in the case of a singular var-cov matrix. +% Univariate treatment of multivariate time series. +% +% INPUTS +% T: mm*mm matrix +% R: mm*rr matrix +% Q: rr*rr matrix +% Pinf1: mm*mm diagonal matrix with with q ones and m-q zeros +% Pstar1: mm*mm variance-covariance matrix with stationary variables +% Y: pp*1 vector +% trend +% pp: number of observed variables +% mm: number of state variables +% smpl: sample size +% mf: observed variables index in the state vector +% +% OUTPUTS +% alphahat: smoothed state variables +% etahat: smoothed shocks +% a1: matrix of one step ahead filtered state variables +% aK: 3D array of k step ahead filtered state variables + +% SPECIAL REQUIREMENTS +% See "Filtering and Smoothing of State Vector for Diffuse State Space +% Models", S.J. Koopman and J. Durbin (2003, in Journal of Time Series +% Analysis, vol. 24(1), pp. 85-98). +% +% part of DYNARE, copyright Dynare Team (2004-2008) +% Gnu Public License. + + % Modified by M. Ratto % New output argument aK: 1-step to nk-stpe ahed predictions) % New input argument nk: max order of predictions in aK @@ -11,12 +43,6 @@ function [alphahat,etahat,a1, aK] = DiffuseKalmanSmoother3(T,R,Q,Pinf1,Pstar1,Y, % Li also stored during DKF iterations !! % some bugs corrected in the DKF part of the smoother (Z matrix and % alphahat) -% -% stephane.adjemian@cepremap.cnrs.fr [09-16-2004] -% -% See "Fast Filtering and Smoothing for Multivariate State Space -% Models", S.J. Koopman and J. Durbin (2000, in Journal of Time Series -% Analysis, vol. 21(3), pp. 281-296). global options_