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

4.0: merged r2283 changeset from trunk (constant estimation bug fix....

4.0: merged r2283 changeset from trunk (constant estimation bug fix. Diminished tolerance in recomputation of steady state for linear models)

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