v4 steady_: checking user provided ..._steadystate.m can't be done for nonstationary models
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@917 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
545c8881c0
commit
8fcac85ea1
|
@ -11,19 +11,26 @@ function steady_()
|
||||||
oo_.exo_det_steady_state]);
|
oo_.exo_det_steady_state]);
|
||||||
% Check if the steady state obtained from the _steadystate file is a
|
% Check if the steady state obtained from the _steadystate file is a
|
||||||
% steady state.
|
% steady state.
|
||||||
cheick = max(abs(feval(fh,dr.ys,[oo_.exo_steady_state; ...
|
cheick = 0;
|
||||||
oo_.exo_det_steady_state]))) > options_.dynatol
|
if isfield(options_,'unit_root_vars')
|
||||||
|
if isempty(options_.unit_root_vars)
|
||||||
|
cheick = max(abs(feval([M_.fname '_steadystate'],...
|
||||||
|
oo_.steady_state,...
|
||||||
|
[oo_.exo_steady_state; ...
|
||||||
|
oo_.exo_det_steady_state]))) > options_.dynatol
|
||||||
|
end
|
||||||
|
end
|
||||||
if ~isempty(options_.steadystate_partial)
|
if ~isempty(options_.steadystate_partial)
|
||||||
ssvar = options_.steadystate_partial.ssvar;
|
ssvar = options_.steadystate_partial.ssvar;
|
||||||
nov = length(ssvar);
|
nov = length(ssvar);
|
||||||
indv = zeros(nov,1);
|
indv = zeros(nov,1);
|
||||||
for i = 1:nov
|
for i = 1:nov
|
||||||
indv(i) = strmatch(ssvar(i),M_.endo_names,'exact');
|
indv(i) = strmatch(ssvar(i),M_.endo_names,'exact');
|
||||||
end
|
end
|
||||||
[oo_.steady_state,check] = dynare_solve('restricted_steadystate',...
|
[oo_.steady_state,check] = dynare_solve('restricted_steadystate',...
|
||||||
oo_.steady_state(indv),...
|
oo_.steady_state(indv),...
|
||||||
options_.jacobian_flag, ...
|
options_.jacobian_flag, ...
|
||||||
[oo_.exo_steady_state;oo_.exo_det_steady_state],indv);
|
[oo_.exo_steady_state;oo_.exo_det_steady_state],indv);
|
||||||
end
|
end
|
||||||
if cheick
|
if cheick
|
||||||
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...
|
[oo_.steady_state,check] = dynare_solve([M_.fname '_static'],...
|
||||||
|
|
Loading…
Reference in New Issue