From b2017ffecedea469b0f084890e47eebb2501d1e9 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Thu, 23 Jul 2015 14:42:09 +0200 Subject: [PATCH] Check whether estimation is fully ML or fully Bayesian Closes #754 --- matlab/dynare_estimation_init.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/matlab/dynare_estimation_init.m b/matlab/dynare_estimation_init.m index a59adbd54..b7865f566 100644 --- a/matlab/dynare_estimation_init.m +++ b/matlab/dynare_estimation_init.m @@ -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;