Skip to content
Snippets Groups Projects
Commit a6bd4221 authored by michel's avatar michel
Browse files

diminished tolerance in computation of steady state for linear models. This...

diminished tolerance in computation of steady state for linear models. This corrects a bug in estimation of constants in linear models.


git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@2283 ac1d8469-bf42-47a9-8791-bf33cf982152
parent bf65cb4f
No related merge requests found
......@@ -67,21 +67,25 @@ if options_.steadystate_flag
[oo_.exo_steady_state; oo_.exo_det_steady_state]);
else
% testing if ys isn't a steady state or if we aren't computing Ramsey policy
if max(abs(feval(fh,dr.ys,[oo_.exo_steady_state; oo_.exo_det_steady_state], M_.params))) ...
> options_.dynatol & options_.ramsey_policy == 0
if options_.ramsey_policy == 0
if options_.linear == 0
% nonlinear models
if max(abs(feval(fh,dr.ys,[oo_.exo_steady_state; ...
oo_.exo_det_steady_state], M_.params))) > options_.dynatol
[dr.ys,check1] = dynare_solve(fh,dr.ys,options_.jacobian_flag,...
[oo_.exo_steady_state; ...
oo_.exo_det_steady_state], M_.params);
end
else
% linear models
[fvec,jacob] = feval(fh,dr.ys,[oo_.exo_steady_state;...
oo_.exo_det_steady_state], M_.params);
if max(abs(fvec)) > 1e-12
dr.ys = dr.ys-jacob\fvec;
end
end
end
end
% testing for problem
if check1
info(1) = 20;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment