Skip to content
Snippets Groups Projects
Verified Commit 096e37f4 authored by Johannes Pfeifer's avatar Johannes Pfeifer Committed by Stéphane Adjemian
Browse files

model_diagnostics.m: fix logic of Ramsey instrument checks

The mapping from economic to steady state instruments is not one-to-one. Trigger warnings instead of errors.
parent 4c1af789
No related branches found
No related tags found
No related merge requests found
...@@ -45,13 +45,13 @@ if options.ramsey_policy ...@@ -45,13 +45,13 @@ if options.ramsey_policy
orig_endo_aux_nbr = M.orig_endo_nbr + min(find([M.aux_vars.type] == 6)) - 1; orig_endo_aux_nbr = M.orig_endo_nbr + min(find([M.aux_vars.type] == 6)) - 1;
implied_inst_nbr = orig_endo_aux_nbr - M.orig_eq_nbr; implied_inst_nbr = orig_endo_aux_nbr - M.orig_eq_nbr;
if inst_nbr>implied_inst_nbr if inst_nbr>implied_inst_nbr
error('You have specified more instruments than there are omitted equations') warning('You have specified more steady state instruments than there are omitted equations. While there are use cases for this setup, it is rather unusual. Check whether this is desired.')
elseif inst_nbr<implied_inst_nbr elseif inst_nbr<implied_inst_nbr
error('You have specified fewer instruments than there are omitted equations') warning('You have specified fewer steady state instruments than there are omitted equations. While there are use cases for this setup, it is rather unusual. Check whether this is desired.')
end end
else else
if options.steadystate_flag if options.steadystate_flag
error('You have specified a steady state file, but not provided an instrument. Either delete the steady state file or provide an instrument') warning('You have specified a steady state file, but not provided steady state instruments. In this case, you typically need to make sure to provide all steady state values, including the ones for the planner''s instrument(s).')
end end
end end
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment