Skip to content
Snippets Groups Projects
Commit 0c3d7c05 authored by Stéphane Adjemian's avatar Stéphane Adjemian Committed by Sébastien Villemot
Browse files

Issue a warning if conditional forecasts are computed with correlated...

Issue a warning if conditional forecasts are computed with correlated innovations (if these correlations are defined in the covariance matrix of the innovations).

(cherry picked from commit 871fa6aa)
parent f8f18679
Branches
No related tags found
No related merge requests found
...@@ -45,7 +45,6 @@ function imcforecast(constrained_paths, constrained_vars, options_cond_fcst) ...@@ -45,7 +45,6 @@ function imcforecast(constrained_paths, constrained_vars, options_cond_fcst)
global options_ oo_ M_ bayestopt_ global options_ oo_ M_ bayestopt_
if ~isfield(options_cond_fcst,'parameter_set') || isempty(options_cond_fcst.parameter_set) if ~isfield(options_cond_fcst,'parameter_set') || isempty(options_cond_fcst.parameter_set)
options_cond_fcst.parameter_set = 'posterior_mode'; options_cond_fcst.parameter_set = 'posterior_mode';
end end
...@@ -145,8 +144,13 @@ end ...@@ -145,8 +144,13 @@ end
if isempty(options_.qz_criterium) if isempty(options_.qz_criterium)
options_.qz_criterium = 1+1e-6; options_.qz_criterium = 1+1e-6;
end end
[T,R,ys,info,M_,options_,oo_] = dynare_resolve(M_,options_,oo_); [T,R,ys,info,M_,options_,oo_] = dynare_resolve(M_,options_,oo_);
if ~isdiagonal(M_.Sigma_e)
warning(sprintf('The innovations are correlated (the covariance matrix has non zero off diagonal elements), the results of the conditional forecasts will\ndepend on the ordering of the innovations (as declared after varexo) because a Cholesky decomposition is used to factorize the covariance matrix.\n\n=> It is preferable to declare the correlations in the model block (explicitly imposing the identification restrictions), unless you are satisfied\nwith the implicit identification restrictions implied by the Cholesky decomposition.'))
end
sQ = chol(M_.Sigma_e,'lower'); sQ = chol(M_.Sigma_e,'lower');
NumberOfStates = length(InitState); NumberOfStates = length(InitState);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment