Output M_ in stoch_simul.m and discretionary_policy.m
Fixes https://git.dynare.org/Dynare/dynare/issues/1711 together with https://git.dynare.org/Dynare/preprocessor/-/merge_requests/15time-shift
parent
3879ce08de
commit
3cf622cdc1
|
@ -1,5 +1,5 @@
|
|||
function [info, oo_, options_] = discretionary_policy(M_, options_, oo_, var_list)
|
||||
% function [info, oo_, options_] = discretionary_policy(M_, options_, oo_, var_list)
|
||||
function [info, oo_, options_, M_] = discretionary_policy(M_, options_, oo_, var_list)
|
||||
% function [info, oo_, options_, M_] = discretionary_policy(M_, options_, oo_, var_list)
|
||||
% INPUTS
|
||||
% - M_ [structure] Matlab's structure describing the model (M_).
|
||||
% - options_ [structure] Matlab's structure describing the current options (options_).
|
||||
|
@ -10,8 +10,9 @@ function [info, oo_, options_] = discretionary_policy(M_, options_, oo_, var_lis
|
|||
% - info [integer] scalar or vector, error code.
|
||||
% - oo_ [structure] Matlab's structure containing the results (oo_).
|
||||
% - options_ [structure] Matlab's structure describing the current options (options_).
|
||||
% - M_ [structure] Matlab's structure describing the model (M_).
|
||||
|
||||
% Copyright (C) 2007-2019 Dynare Team
|
||||
% Copyright (C) 2007-2020 Dynare Team
|
||||
%
|
||||
% This file is part of Dynare.
|
||||
%
|
||||
|
@ -33,7 +34,7 @@ M_=discretionary_policy_initialization(M_,options_);
|
|||
origorder = options_.order;
|
||||
options_.discretionary_policy = 1;
|
||||
options_.order = 1;
|
||||
[info, oo_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
|
||||
if ~options_.noprint
|
||||
disp_steady_state(M_,oo_)
|
||||
|
|
|
@ -283,7 +283,7 @@ if info(1) == 0 %no errors in solution
|
|||
end
|
||||
analytic_derivation = options_.analytic_derivation;
|
||||
options_.analytic_derivation = -2; %this sets asy_Hess=1 in dsge_likelihood.m
|
||||
[info, oo_, options_] = stoch_simul(M_, options_, oo_, options_.varobs);
|
||||
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, options_.varobs);
|
||||
dataset_ = dseries(oo_.endo_simul(options_.varobs_id,100+1:end)',dates('1Q1'), options_.varobs); %get information on moments
|
||||
derivatives_info.no_DLIK = 1;
|
||||
bounds = prior_bounds(bayestopt_, options_.prior_trunc); %reset bounds as lb and ub must only be operational during mode-finding
|
||||
|
|
|
@ -62,4 +62,4 @@ if ~options_.noprint
|
|||
end
|
||||
osr_res = osr1(i_params,i_var,W);
|
||||
|
||||
[~, oo_, options_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
[~, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
|
|
|
@ -39,7 +39,7 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
[info, oo_, options_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
[info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list);
|
||||
|
||||
oo_.steady_state = oo_.dr.ys;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function [info, oo_, options_] = stoch_simul(M_, options_, oo_, var_list)
|
||||
function [info, oo_, options_, M_] = stoch_simul(M_, options_, oo_, var_list)
|
||||
|
||||
% Copyright (C) 2001-2020 Dynare Team
|
||||
%
|
||||
|
|
|
@ -130,7 +130,7 @@ par=load([M_.fname filesep 'metropolis' filesep M_.fname '_posterior_draws1']);
|
|||
|
||||
for par_iter=1:size(par.pdraws,1)
|
||||
M_=set_parameters_locally(M_,par.pdraws{par_iter,1});
|
||||
[info, oo_, options_]=stoch_simul(M_, options_, oo_, var_list_);
|
||||
[info, oo_, options_, M_]=stoch_simul(M_, options_, oo_, var_list_);
|
||||
correlation(:,:,par_iter)=cell2mat(oo_.autocorr);
|
||||
covariance(:,:,par_iter)=oo_.var;
|
||||
conditional_variance_decomposition(:,:,:,par_iter)=oo_.conditional_variance_decomposition;
|
||||
|
|
Loading…
Reference in New Issue