Merge branch 'compute_decision_rules' into 'master'
Use of the compute_decision_rules function to factorize code See merge request Dynare/dynare!1856time-shift
commit
ba3522a9ba
|
@ -142,7 +142,7 @@ for file = 1:NumberOfDrawsFiles
|
||||||
dr = temp.pdraws{linee,2};
|
dr = temp.pdraws{linee,2};
|
||||||
else
|
else
|
||||||
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_)
|
||||||
end
|
end
|
||||||
if first_call
|
if first_call
|
||||||
endo_nbr = M_.endo_nbr;
|
endo_nbr = M_.endo_nbr;
|
||||||
|
|
|
@ -115,7 +115,7 @@ for file = 1:NumberOfDrawsFiles
|
||||||
dr = temp.pdraws{linee,2};
|
dr = temp.pdraws{linee,2};
|
||||||
else
|
else
|
||||||
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
end
|
end
|
||||||
if ~options_.pruning
|
if ~options_.pruning
|
||||||
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
||||||
|
|
|
@ -113,7 +113,7 @@ for file = 1:NumberOfDrawsFiles
|
||||||
dr = temp.pdraws{linee,2};
|
dr = temp.pdraws{linee,2};
|
||||||
else
|
else
|
||||||
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
end
|
end
|
||||||
if ~options_.pruning
|
if ~options_.pruning
|
||||||
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
tmp = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
||||||
|
|
|
@ -141,7 +141,7 @@ for file = 1:NumberOfDrawsFiles
|
||||||
dr = temp.pdraws{linee,2};
|
dr = temp.pdraws{linee,2};
|
||||||
else
|
else
|
||||||
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
M_=set_parameters_locally(M_,temp.pdraws{linee,1});
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
end
|
end
|
||||||
if file==1 && linee==1
|
if file==1 && linee==1
|
||||||
[tmp, stationary_vars] = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
[tmp, stationary_vars] = th_autocovariances(dr,ivar,M_,options_,nodecomposition);
|
||||||
|
|
|
@ -48,7 +48,7 @@ steady_;
|
||||||
|
|
||||||
% Compute the first order perturbation reduced form.
|
% Compute the first order perturbation reduced form.
|
||||||
old_options_order = options_.order; options_.order = 1;
|
old_options_order = options_.order; options_.order = 1;
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
oo_.dr = dr;
|
oo_.dr = dr;
|
||||||
options_.order = old_options_order;
|
options_.order = old_options_order;
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ if info
|
||||||
pdraws(linee,1) = {x2(SampleAddress(i,4),:)};
|
pdraws(linee,1) = {x2(SampleAddress(i,4),:)};
|
||||||
if info-1
|
if info-1
|
||||||
set_parameters(pdraws{linee,1});
|
set_parameters(pdraws{linee,1});
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
pdraws(linee,2) = { dr };
|
pdraws(linee,2) = { dr };
|
||||||
end
|
end
|
||||||
old_mhfile = mhfile;
|
old_mhfile = mhfile;
|
||||||
|
|
|
@ -71,7 +71,7 @@ else
|
||||||
logged_steady_state_indicator=0;
|
logged_steady_state_indicator=0;
|
||||||
end
|
end
|
||||||
|
|
||||||
[dr,info,M_,options_,oo_] = resol(0,M_,options_,oo_);
|
[dr,info,M_,options_,oo_] = compute_decision_rules(M_,options_,oo_);
|
||||||
oo_.dr=dr;
|
oo_.dr=dr;
|
||||||
if info(1)
|
if info(1)
|
||||||
fprintf('\nsimulated_moment_uncertainty: model could not be solved')
|
fprintf('\nsimulated_moment_uncertainty: model could not be solved')
|
||||||
|
|
Loading…
Reference in New Issue