From 04554967fc49539b570b7c266b274eb433783e32 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Sun, 9 Mar 2014 17:05:59 +0100 Subject: [PATCH] Fix bug in imcforecast.m where covariance matrix was decomposed element-wise instead of via Cholesky. --- matlab/imcforecast.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matlab/imcforecast.m b/matlab/imcforecast.m index 766394fbc..d32999914 100644 --- a/matlab/imcforecast.m +++ b/matlab/imcforecast.m @@ -129,7 +129,7 @@ if isempty(options_.qz_criterium) end [T,R,ys,info,M_,options_,oo_] = dynare_resolve(M_,options_,oo_); -sQ = sqrt(M_.Sigma_e); +sQ = chol(M_.Sigma_e,'lower'); NumberOfStates = length(InitState); FORCS1 = zeros(NumberOfStates,options_cond_fcst.periods+1,options_cond_fcst.replic);