Revert "added calls to re-initialize persistent variable 'penalty' in dsge_likelihood() and dsge_likelihood_hh() before calling the optimizer"
This reverts commit 108444b703
.
The initialization works indeed differently and I will document it in next commit.
time-shift
parent
f13615c922
commit
de8962b239
|
@ -140,8 +140,6 @@ end
|
||||||
|
|
||||||
%% Estimation of the posterior mode or likelihood mode
|
%% Estimation of the posterior mode or likelihood mode
|
||||||
if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
|
if ~isequal(options_.mode_compute,0) && ~options_.mh_posterior_mode_estimation
|
||||||
% initializing persistent variable 'penalty' in dsge_likelihood()
|
|
||||||
dsge_likelihood();
|
|
||||||
switch options_.mode_compute
|
switch options_.mode_compute
|
||||||
case 1
|
case 1
|
||||||
optim_options = optimset('display','iter','LargeScale','off', ...
|
optim_options = optimset('display','iter','LargeScale','off', ...
|
||||||
|
|
|
@ -55,8 +55,6 @@ htol0=htol_base;
|
||||||
gibbstol=length(BayesInfo.pshape)/50; %25;
|
gibbstol=length(BayesInfo.pshape)/50; %25;
|
||||||
|
|
||||||
func_hh = str2func([func2str(func0),'_hh']);
|
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);
|
fval0=feval(func0,x,DynareDataset,DynareOptions,Model,EstimatedParameters,BayesInfo,DynareResults);
|
||||||
fval=fval0;
|
fval=fval0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue