Add check for point priors and force user to fix this parameter.

Traps Inf-prior
time-shift
Johannes Pfeifer 2014-09-17 20:06:57 +02:00 committed by Stéphane Adjemian (Charybdis)
parent 86d6e21450
commit 9c3c0d727f
1 changed files with 6 additions and 0 deletions

View File

@ -155,6 +155,12 @@ end
bayestopt_.p6 = NaN(size(bayestopt_.p1)) ;
bayestopt_.p7 = bayestopt_.p6 ;
%% check for point priors and disallow them as they do not work with MCMC
if any(bayestopt_.p2 ==0)
error(sprintf(['Error in prior for %s: you cannot use a point prior in estimation. Either increase the prior standard deviation',...
' or fix the parameter completely.'], bayestopt_.name{bayestopt_.p2 ==0}))
end
% generalized location parameters by default for beta distribution
k = find(bayestopt_.pshape == 1);
k1 = find(isnan(bayestopt_.p3(k)));