Merge branch 'prior_dens_info' into 'master'
Deal with info returned by priordens being a vector See merge request Dynare/dynare!1629time-shift
commit
ad451ad224
|
@ -106,7 +106,7 @@ end
|
||||||
test_for_deep_parameters_calibration(Model);
|
test_for_deep_parameters_calibration(Model);
|
||||||
|
|
||||||
[lnprior,~,~,info]= priordens(xparam1,BayesInfo.pshape,BayesInfo.p6,BayesInfo.p7,BayesInfo.p3,BayesInfo.p4);
|
[lnprior,~,~,info]= priordens(xparam1,BayesInfo.pshape,BayesInfo.p6,BayesInfo.p7,BayesInfo.p3,BayesInfo.p4);
|
||||||
if info
|
if any(info)
|
||||||
fprintf('The prior density evaluated at the initial values is Inf for the following parameters: %s\n',BayesInfo.name{info,1})
|
fprintf('The prior density evaluated at the initial values is Inf for the following parameters: %s\n',BayesInfo.name{info,1})
|
||||||
error('The initial value of the prior is -Inf')
|
error('The initial value of the prior is -Inf')
|
||||||
end
|
end
|
||||||
|
|
|
@ -144,7 +144,7 @@ if tt5
|
||||||
if any(x(id5)-p3(id5)<0) || any(x(id5)-p4(id5)>0)
|
if any(x(id5)-p3(id5)<0) || any(x(id5)-p4(id5)>0)
|
||||||
logged_prior_density = -Inf ;
|
logged_prior_density = -Inf ;
|
||||||
if nargout ==4
|
if nargout ==4
|
||||||
info=id5(any(x(id5)-p3(id5)<0) || any(x(id5)-p4(id5)>0));
|
info=id5((x(id5)-p3(id5)<0) || (x(id5)-p4(id5)>0));
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue