bugs around forecast functions using M_ and oo_ globals
git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@936 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
8aada363be
commit
2dd8f7fce5
|
@ -7,7 +7,8 @@ function [yf,var_yf]=forcst(dr,y0,k,m)
|
||||||
|
|
||||||
nstatic = dr.nstatic;
|
nstatic = dr.nstatic;
|
||||||
npred = dr.npred;
|
npred = dr.npred;
|
||||||
j = find(kstate(dr.kae,2) <= ykmin_+1);
|
%j = find(dr.kstate(dr.kae,2) <= ykmin_+1);
|
||||||
|
j = find(dr.kstate(dr.kae,2) <= M_.maximum_lag+1);
|
||||||
kae = dr.kae(j);
|
kae = dr.kae(j);
|
||||||
nh = size(dr.ghx,2);
|
nh = size(dr.ghx,2);
|
||||||
hx = dr.ghx(nstatic+1:nstatic+npred,:);
|
hx = dr.ghx(nstatic+1:nstatic+npred,:);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
% Copyright (C) 2005 Michel Juillard
|
% Copyright (C) 2005 Michel Juillard
|
||||||
%
|
%
|
||||||
function forecast(var_list)
|
function forecast(var_list)
|
||||||
global options_ dr_ oo_
|
global options_ dr_ oo_ M_
|
||||||
|
|
||||||
old_options = options_;
|
old_options = options_;
|
||||||
options_ = set_default_option(options_,'periods',40);
|
options_ = set_default_option(options_,'periods',40);
|
||||||
|
@ -17,7 +17,7 @@ function forecast(var_list)
|
||||||
end
|
end
|
||||||
|
|
||||||
if M_.exo_det_nbr == 0
|
if M_.exo_det_nbr == 0
|
||||||
[yf,int_width] = forcst(dr_,y0,options_.periods,var_list);
|
[yf,int_width] = forcst(oo_.dr,y0,options_.periods,var_list);
|
||||||
else
|
else
|
||||||
exo_det_length = size(oo_.exo_det_simul,1);
|
exo_det_length = size(oo_.exo_det_simul,1);
|
||||||
if options_.periods > exo_det_length
|
if options_.periods > exo_det_length
|
||||||
|
@ -25,7 +25,8 @@ function forecast(var_list)
|
||||||
oo_.ex_det_simul = [ oo_.exo_det_simul;...
|
oo_.ex_det_simul = [ oo_.exo_det_simul;...
|
||||||
repmat(oo_.exo_det_steady_state',...
|
repmat(oo_.exo_det_steady_state',...
|
||||||
options_.periods- ...
|
options_.periods- ...
|
||||||
ex_det_length,1),1)];
|
ex_det_length,1)];
|
||||||
|
%ex_det_length,1),1)];
|
||||||
elseif options_.periods < exo_det_length
|
elseif options_.periods < exo_det_length
|
||||||
ex = zeros(exo_det_length,M_.exo_nbr);
|
ex = zeros(exo_det_length,M_.exo_nbr);
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue