Merge branch 'planner_output' of git.dynare.org:JohannesPfeifer/dynare

Ref. !1949
pac-components
Sébastien Villemot 2021-10-22 17:38:28 +02:00
commit 356999768c
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 8 additions and 1 deletions

View File

@ -168,13 +168,20 @@ if options_.ramsey_policy
options_.noprint = 0;
end
if any(isnan(oo_.mean)) || any(isnan(oo_.mean))
fprintf('evaluate_planner_objective: encountered NaN moments in the endogenous variables often associated\n')
fprintf('evaluate_planner_objective: with either non-stationary variables or singularity due e.g. including\n')
fprintf('evaluate_planner_objective: the planner objective function (or additive parts of it) in the model.\n')
fprintf('evaluate_planner_objective: I will replace the NaN with a large number, but tread carefully,\n')
fprintf('evaluate_planner_objective: check your model, and watch out for strange results.\n')
end
oo_.mean(isnan(oo_.mean)) = options_.huge_number;
oo_.var(isnan(oo_.var)) = options_.huge_number;
Ey = oo_.mean;
Eyhat = Ey - ys(dr.order_var(nstatic+(1:nspred)));
Eyhatyhat = oo_.var(:)
Eyhatyhat = oo_.var(:);
Euu = M_.Sigma_e(:);
EU = U + Uy*gy*Eyhat + 0.5*((Uyygygy + Uy*gyy)*Eyhatyhat + (Uyygugu + Uy*guu)*Euu + Uy*gss);