From 19fdb309ac18befd9932599047f823a126349fe3 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer Date: Mon, 27 Jul 2015 10:19:02 +0200 Subject: [PATCH] Fix computation of prior mode for uniform distribution While this code is never actually used, we return the prior mean, which is directly given by the first hyperparameter. --- matlab/distributions/compute_prior_mode.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matlab/distributions/compute_prior_mode.m b/matlab/distributions/compute_prior_mode.m index 50df6a168..e6d35920c 100644 --- a/matlab/distributions/compute_prior_mode.m +++ b/matlab/distributions/compute_prior_mode.m @@ -22,7 +22,7 @@ function m = compute_prior_mode(hyperparameters,shape) % [3] The uniform distribution has an infinity of modes. In this case the function returns the prior mean. % [4] For the beta distribution we can have 1, 2 or an infinity of modes. -% Copyright (C) 2009 Dynare Team +% Copyright (C) 2009-2015 Dynare Team % % This file is part of Dynare. % @@ -74,7 +74,7 @@ switch shape m = m + hyperparameters(3); end case 5 - m = .5*(hyperparameters(2)-hyperparameters(1)) ; + m = hyperparameters(1); case 6 % s = hyperparameters(1) % nu = hyperparameters(2)