Check whether estimation is fully ML or fully Bayesian

Closes #754
time-shift
Johannes Pfeifer 2015-07-23 14:42:09 +02:00
parent 5f7a8a6b0e
commit b2017ffece
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,9 @@ if ~isempty(estim_params_)
[xparam1,estim_params_,bayestopt_,lb,ub,M_] = set_prior(estim_params_,M_,options_);
end
if ~all(bayestopt_.pshape~=0) || ~all(bayestopt_.pshape==0)
error('Estimation must be either fully ML or fully Bayesian. Maybe you forgot to specify a prior distribution.')
end
% Check if a _prior_restrictions.m file exists
if exist([M_.fname '_prior_restrictions.m'])
options_.prior_restrictions.status = 1;