From de8962b2390988920982956e6e7860b3d22d7bd4 Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Mon, 9 Jan 2012 20:47:11 +0100 Subject: [PATCH] Revert "added calls to re-initialize persistent variable 'penalty' in dsge_likelihood() and dsge_likelihood_hh() before calling the optimizer" This reverts commit 108444b70301378c4e451b5751630bb86dc3148f. The initialization works indeed differently and I will document it in next commit. --- matlab/dynare_estimation_1.m | 2 -- matlab/newrat.m | 2 -- 2 files changed, 4 deletions(-) diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index 24508429f..5d5eb01bc 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -140,8 +140,6 @@ end %% Estimation of the posterior mode or likelihood mode if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation - % initializing persistent variable 'penalty' in dsge_likelihood() - dsge_likelihood(); switch options_.mode_compute case 1 optim_options = optimset('display','iter','LargeScale','off', ... diff --git a/matlab/newrat.m b/matlab/newrat.m index 883ac7c49..619dd90a0 100644 --- a/matlab/newrat.m +++ b/matlab/newrat.m @@ -55,8 +55,6 @@ htol0=htol_base; gibbstol=length(BayesInfo.pshape)/50; %25; func_hh = str2func([func2str(func0),'_hh']); -% initialize persistent variable 'penalty' in func_hh() -func_hh(); fval0=feval(func0,x,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults); fval=fval0;