From 9f161ff339ab7ced3f865e8dc2eb9a45ffb70ccf Mon Sep 17 00:00:00 2001 From: Michel Juillard Date: Wed, 13 Jun 2012 15:55:01 +0200 Subject: [PATCH] fixing lower bound for priors on correlation coefficients --- matlab/set_prior.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/set_prior.m b/matlab/set_prior.m index 23cf6a588..5139689fe 100644 --- a/matlab/set_prior.m +++ b/matlab/set_prior.m @@ -99,7 +99,7 @@ end if ncx xparam1 = [xparam1; estim_params_.corrx(:,3)]; ub = [ub; max(min(estim_params_.corrx(:,5),1),-1)]; - lb = [lb; max(min(estim_params_.corrx(:,4),1),-1)]; + lb = [lb; min(max(estim_params_.corrx(:,4),-1),1)]; bayestopt_.pshape = [ bayestopt_.pshape; estim_params_.corrx(:,6)]; bayestopt_.p1 = [ bayestopt_.p1; estim_params_.corrx(:,7)]; bayestopt_.p2 = [ bayestopt_.p2; estim_params_.corrx(:,8)]; @@ -117,7 +117,7 @@ if ncn end xparam1 = [xparam1; estim_params_.corrn(:,3)]; ub = [ub; max(min(estim_params_.corrn(:,5),1),-1)]; - lb = [lb; max(min(estim_params_.corrn(:,4),1),-1)]; + lb = [lb; min(max(estim_params_.corrn(:,4),-1),1)]; bayestopt_.pshape = [ bayestopt_.pshape; estim_params_.corrn(:,6)]; bayestopt_.p1 = [ bayestopt_.p1; estim_params_.corrn(:,7)]; bayestopt_.p2 = [ bayestopt_.p2; estim_params_.corrn(:,8)];