fixing bugs related to recent changes for analytic derivatives
in estimationtime-shift
parent
da9ec0f187
commit
d601f173d8
|
@ -39,6 +39,12 @@ persistent penalty dsge_prior_weight_idx
|
|||
|
||||
grad=[];
|
||||
hess=[];
|
||||
exit_flag = [];
|
||||
info = [];
|
||||
PHI = [];
|
||||
SIGMAu = [];
|
||||
iXX = [];
|
||||
prior = [];
|
||||
|
||||
% Initialization of the penalty
|
||||
if ~nargin || isempty(penalty)
|
||||
|
@ -263,7 +269,7 @@ end
|
|||
lnprior = priordens(xparam1,BayesInfo.pshape,BayesInfo.p6,BayesInfo.p7,BayesInfo.p3,BayesInfo.p4);
|
||||
fval = (lik-lnprior);
|
||||
|
||||
if (nargout == 6)
|
||||
if (nargout == 8)
|
||||
if isinf(dsge_prior_weight)
|
||||
iXX = iGXX;
|
||||
else
|
||||
|
@ -271,7 +277,7 @@ if (nargout == 6)
|
|||
end
|
||||
end
|
||||
|
||||
if (nargout==7)
|
||||
if (nargout==9)
|
||||
if isinf(dsge_prior_weight)
|
||||
iXX = iGXX;
|
||||
else
|
||||
|
|
|
@ -180,7 +180,7 @@ while fpar<npar
|
|||
end
|
||||
if MAX_nirfs_dsgevar
|
||||
IRUN = IRUN+1;
|
||||
[fval,cost_flag,info,PHI,SIGMAu,iXX] = DsgeVarLikelihood(deep',dataset_,options_,M_,estim_params_,bayestopt_,oo_);
|
||||
[fval,junk1,junk2,cost_flag,info,PHI,SIGMAu,iXX] = DsgeVarLikelihood(deep',dataset_,options_,M_,estim_params_,bayestopt_,oo_);
|
||||
dsge_prior_weight = M_.params(strmatch('dsge_prior_weight',M_.param_names));
|
||||
DSGE_PRIOR_WEIGHT = floor(dataset_.info.ntobs*(1+dsge_prior_weight));
|
||||
SIGMA_inv_upper_chol = chol(inv(SIGMAu*dataset_.info.ntobs*(dsge_prior_weight+1)));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function [loss,vx,info]=osr_obj(x,i_params,i_var,weights);
|
||||
function [loss,vx,junk,exit_flag]=osr_obj(x,i_params,i_var,weights);
|
||||
% objective function for optimal simple rules (OSR)
|
||||
|
||||
% Copyright (C) 2005-2009 Dynare Team
|
||||
|
@ -21,6 +21,8 @@ function [loss,vx,info]=osr_obj(x,i_params,i_var,weights);
|
|||
global M_ oo_ options_ optimal_Q_ it_
|
||||
% global ys_ Sigma_e_ endo_nbr exo_nbr optimal_Q_ it_ ykmin_ options_
|
||||
|
||||
junk = [];
|
||||
exit_flag = 1;
|
||||
vx = [];
|
||||
% set parameters of the policiy rule
|
||||
M_.params(i_params) = x;
|
||||
|
|
Loading…
Reference in New Issue