estimation: save bayestopt_ in *_mode.mat file
git-svn-id: https://www.dynare.org/svn/dynare/trunk@2403 ac1d8469-bf42-47a9-8791-bf33cf982152time-shift
parent
449baffb0a
commit
73873d7b2c
|
@ -341,6 +341,7 @@ if options_.mode_compute == 0 & length(options_.mode_file) == 0
|
||||||
eval(['oo_.SmoothedShocks.' deblank(M_.exo_names(i,:)) ' = innov(i,:)'';']);
|
eval(['oo_.SmoothedShocks.' deblank(M_.exo_names(i,:)) ' = innov(i,:)'';']);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
save([M_.fname '_mode.mat'],'xparam1','hh','bayestopt_');
|
||||||
return;
|
return;
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -419,7 +420,7 @@ if options_.mode_compute > 0 & options_.posterior_mode_estimation
|
||||||
else
|
else
|
||||||
[xparam1,hh,gg,fval,invhess] = newrat('DsgeVarLikelihood',xparam1,hh,gg,igg,crit,nit,flag,gend);
|
[xparam1,hh,gg,fval,invhess] = newrat('DsgeVarLikelihood',xparam1,hh,gg,igg,crit,nit,flag,gend);
|
||||||
end
|
end
|
||||||
save([M_.fname '_mode.mat'],'xparam1','hh','gg','fval','invhess');
|
save([M_.fname '_mode.mat'],'xparam1','hh','gg','fval','invhess','bayestopt_');
|
||||||
case 6
|
case 6
|
||||||
if ~options_.bvar_dsge
|
if ~options_.bvar_dsge
|
||||||
fval = DsgeLikelihood(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);
|
fval = DsgeLikelihood(xparam1,gend,data,data_index,number_of_observations,no_more_missing_observations);
|
||||||
|
@ -521,12 +522,9 @@ if options_.mode_compute > 0 & options_.posterior_mode_estimation
|
||||||
else
|
else
|
||||||
hh = reshape(hessian('DsgeVarLikelihood',xparam1,options_.gstep,gend),nx,nx);
|
hh = reshape(hessian('DsgeVarLikelihood',xparam1,options_.gstep,gend),nx,nx);
|
||||||
end
|
end
|
||||||
save([M_.fname '_mode.mat'],'xparam1','hh','fval');
|
|
||||||
else
|
|
||||||
save([M_.fname '_mode.mat'],'xparam1','hh','fval');
|
|
||||||
end
|
end
|
||||||
|
save([M_.fname '_mode.mat'],'xparam1','hh','bayestopt_');
|
||||||
end
|
end
|
||||||
save([M_.fname '_mode.mat'],'xparam1','hh');
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if options_.mode_check == 1 & options_.posterior_mode_estimation
|
if options_.mode_check == 1 & options_.posterior_mode_estimation
|
||||||
|
|
Loading…
Reference in New Issue