From 7f0318856afaa904f70d882fb592b999efd2de20 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 23 Jul 2015 16:52:21 +0200 Subject: [PATCH 1/2] Delete mode-file option after completing estimation Prevents the recursive estimation from altering the option and closes #378 --- matlab/dynare_estimation.m | 1 + 1 file changed, 1 insertion(+) diff --git a/matlab/dynare_estimation.m b/matlab/dynare_estimation.m index 7bb49f380..06a220e45 100644 --- a/matlab/dynare_estimation.m +++ b/matlab/dynare_estimation.m @@ -199,3 +199,4 @@ if nnobs > 1 && horizon > 0 end end end +options_.mode_file = ''; %delete stored mode-file so that it is not reaccessed in later calls (and in case it was only set by the recursive estimation) From 08b42f9adbf73f1bc242709f6032ab487a73b2ea Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 23 Jul 2015 17:19:09 +0200 Subject: [PATCH 2/2] Add disclaimer to manual regarding reset of mode-file. --- doc/dynare.texi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 4a6c642ac..d661d35b6 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -4905,7 +4905,11 @@ simulation that crashed prematurely. Shouldn't be used together with Name of the file containing previous value for the mode. When computing the mode, Dynare stores the mode (@code{xparam1}) and the hessian (@code{hh}, only if @code{cova_compute=1}) in a file called -@file{@var{MODEL_FILENAME}_mode.mat} +@file{@var{MODEL_FILENAME}_mode.mat}. After a successful run of the estimation +command, the @code{mode_file} will be disabled to prevent other function calls +from implicitly using an updated mode-file. Thus, if the mod-file contains subsequent +@code{estimation} commands, the @code{mode_file} option, if desired, needs to be +specified again. @item mode_compute = @var{INTEGER} | @var{FUNCTION_NAME} @anchor{mode_compute}