Merge branch 'sub_draws' into 'master'
trap error when sub_draws is set to zero See merge request Dynare/dynare!1699time-shift
commit
d0dc40c29e
|
@ -519,6 +519,7 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ...
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
[error_flag,~,options_]= metropolis_draw(1,options_,estim_params_,M_);
|
[error_flag,~,options_]= metropolis_draw(1,options_,estim_params_,M_);
|
||||||
|
if ~(~isempty(options_.sub_draws) && options_.sub_draws==0)
|
||||||
if options_.bayesian_irf
|
if options_.bayesian_irf
|
||||||
if error_flag
|
if error_flag
|
||||||
error('Estimation::mcmc: I cannot compute the posterior IRFs!')
|
error('Estimation::mcmc: I cannot compute the posterior IRFs!')
|
||||||
|
@ -537,6 +538,9 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ...
|
||||||
end
|
end
|
||||||
prior_posterior_statistics('posterior',dataset_,dataset_info);
|
prior_posterior_statistics('posterior',dataset_,dataset_info);
|
||||||
end
|
end
|
||||||
|
else
|
||||||
|
fprintf('Estimation:mcmc: sub_draws was set to 0. Skipping posterior computations.')
|
||||||
|
end
|
||||||
xparam1 = get_posterior_parameters('mean',M_,estim_params_,oo_,options_);
|
xparam1 = get_posterior_parameters('mean',M_,estim_params_,oo_,options_);
|
||||||
M_ = set_all_parameters(xparam1,estim_params_,M_);
|
M_ = set_all_parameters(xparam1,estim_params_,M_);
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue