From 7d1d860a5311a631b9156da15502a19cb12f8e43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=28Charybdis=29?= <stephane.adjemian@univ-lemans.fr> Date: Tue, 19 Apr 2016 12:16:31 +0200 Subject: [PATCH] Fixed ep.init option. Initialization of the perfect foresight solver (in extended path) with the solution of the first order approximation of the model was broken. If the value of options_.ep.init is "true"" (1) then the solution of the first order approximation is used as an initial guess for the newton lilke solver. If the value of options_.ep.init is "false" (0) the solver is initialized with the steady state. --- matlab/ep/extended_path.m | 2 +- matlab/ep/extended_path_initialization.m | 2 +- matlab/ep/extended_path_mc.m | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/ep/extended_path.m b/matlab/ep/extended_path.m index 33e7fa7e18..012292adc8 100644 --- a/matlab/ep/extended_path.m +++ b/matlab/ep/extended_path.m @@ -36,7 +36,7 @@ function [ts, DynareResults] = extended_path(initialconditions, samplesize, exog % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -[initialconditions, innovations, pfm, ep, verbosity, DynareOptions] = ... +[initialconditions, innovations, pfm, ep, verbosity, DynareOptions, DynareResults] = ... extended_path_initialization(initialconditions, samplesize, exogenousvariables, DynareOptions, DynareModel, DynareResults); [shocks, spfm_exo_simul, innovations, DynareResults] = extended_path_shocks(innovations, ep, exogenousvariables, samplesize, DynareResults); diff --git a/matlab/ep/extended_path_initialization.m b/matlab/ep/extended_path_initialization.m index 27d8c25adf..3c10b3305c 100644 --- a/matlab/ep/extended_path_initialization.m +++ b/matlab/ep/extended_path_initialization.m @@ -1,4 +1,4 @@ -function [initial_conditions, innovations, pfm, ep, verbosity, DynareOptions] = extended_path_initialization(initial_conditions, sample_size, exogenousvariables, DynareOptions, DynareModel, DynareResults) +function [initial_conditions, innovations, pfm, ep, verbosity, DynareOptions, DynareResults] = extended_path_initialization(initial_conditions, sample_size, exogenousvariables, DynareOptions, DynareModel, DynareResults) % Initialization of the extended path routines. % diff --git a/matlab/ep/extended_path_mc.m b/matlab/ep/extended_path_mc.m index ca204a6d6e..78a2aba505 100644 --- a/matlab/ep/extended_path_mc.m +++ b/matlab/ep/extended_path_mc.m @@ -36,7 +36,7 @@ function Simulations = extended_path_mc(initialconditions, samplesize, replic, e % You should have received a copy of the GNU General Public License % along with Dynare. If not, see <http://www.gnu.org/licenses/>. -[initialconditions, innovations, pfm, ep, verbosity, DynareOptions] = ... +[initialconditions, innovations, pfm, ep, verbosity, DynareOptions, DynareResults] = ... extended_path_initialization(initialconditions, samplesize, exogenousvariables, DynareOptions, DynareModel, DynareResults); % Check the dimension of the first input argument -- GitLab