From 68d3852cbfc670c5e08fca6ccc8ec7f26d4b5886 Mon Sep 17 00:00:00 2001
From: Johannes Pfeifer <jpfeifer@gmx.de>
Date: Wed, 14 Nov 2018 08:35:43 +0100
Subject: [PATCH] Correctly update covariance matrix of exogenous shocks during
 prior simulation

---
 matlab/cli/prior.m | 1 +
 1 file changed, 1 insertion(+)

diff --git a/matlab/cli/prior.m b/matlab/cli/prior.m
index 1e1fb49851..efb4468265 100644
--- a/matlab/cli/prior.m
+++ b/matlab/cli/prior.m
@@ -171,6 +171,7 @@ if ismember('moments(distribution)', varargin) % Prior simulations (BK).
                 dr = tmp.pdraws{j,3};
                 oo__ = oo_;
                 oo__.dr = dr;
+                Model=set_parameters_locally(Model,tmp.pdraws{j,1});% Needed to update the covariance matrix of the state innovations.
                 oo__ = disp_th_moments(oo__.dr, [], Model, options_, oo__);
                 FirstOrderMoments(:,iter) = oo__.mean;
                 SecondOrderMoments(:,:,iter) = oo__.var;
-- 
GitLab