Skip to content
Snippets Groups Projects
Commit fd7386b5 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Merge remote-tracking branch 'jpfeifer/master'

parents cba7a3fc d50e68ef
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ function bounds = prior_bounds(bayestopt,options) ...@@ -4,7 +4,7 @@ function bounds = prior_bounds(bayestopt,options)
%! @deftypefn {Function File} {@var{bounds} =} prior_bounds (@var{bayesopt},@var{option}) %! @deftypefn {Function File} {@var{bounds} =} prior_bounds (@var{bayesopt},@var{option})
%! @anchor{prior_bounds} %! @anchor{prior_bounds}
%! @sp 1 %! @sp 1
%! Returns bounds for the prior densities. For each estimated parameter the upper and lower bounds %! Returns bounds for the prior densities. For each estimated parameter the lower and upper bounds
%! are such that the defined intervals contains a probability mass equal to 1-2*@var{option}.prior_trunc. The %! are such that the defined intervals contains a probability mass equal to 1-2*@var{option}.prior_trunc. The
%! default value for @var{option}.prior_trunc is 1e-10 (set in @ref{global_initialization}). %! default value for @var{option}.prior_trunc is 1e-10 (set in @ref{global_initialization}).
%! @sp 2 %! @sp 2
...@@ -43,7 +43,7 @@ function bounds = prior_bounds(bayestopt,options) ...@@ -43,7 +43,7 @@ function bounds = prior_bounds(bayestopt,options)
% bayestopt [structure] characterizing priors (shape, mean, p1..p4) % bayestopt [structure] characterizing priors (shape, mean, p1..p4)
% %
% OUTPUTS % OUTPUTS
% bounds [double] matrix specifying prior bounds (row= parameter, column=upper&lower bound) % bounds [double] matrix specifying prior bounds (row= parameter, column=lower&upper bound)
% %
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
......
...@@ -118,7 +118,7 @@ end ...@@ -118,7 +118,7 @@ end
%%%% %%%%
if any(isnan(bayestopt_.jscale)) if any(isnan(bayestopt_.jscale)) || (options_.mode_compute==0 && ~isempty(options_.mode_file))
if exist([ModelName '_optimal_mh_scale_parameter.mat'])% This file is created by mode_compute=6. if exist([ModelName '_optimal_mh_scale_parameter.mat'])% This file is created by mode_compute=6.
load([ModelName '_optimal_mh_scale_parameter']) load([ModelName '_optimal_mh_scale_parameter'])
proposal_covariance_Cholesky_decomposition = d*Scale; proposal_covariance_Cholesky_decomposition = d*Scale;
......
...@@ -106,9 +106,9 @@ if ncx ...@@ -106,9 +106,9 @@ if ncx
bayestopt_.p3 = [ bayestopt_.p3; estim_params_.corrx(:,9)]; bayestopt_.p3 = [ bayestopt_.p3; estim_params_.corrx(:,9)];
bayestopt_.p4 = [ bayestopt_.p4; estim_params_.corrx(:,10)]; bayestopt_.p4 = [ bayestopt_.p4; estim_params_.corrx(:,10)];
bayestopt_.jscale = [ bayestopt_.jscale; estim_params_.corrx(:,11)]; bayestopt_.jscale = [ bayestopt_.jscale; estim_params_.corrx(:,11)];
bayestopt_.name = [bayestopt_.name; cellstr(['corr ' ... bayestopt_.name = [bayestopt_.name; cellstr([repmat('corr ',ncx,1)...
deblank(M_.exo_names(estim_params_.corrx(:,1),:)) ... deblank(M_.exo_names(estim_params_.corrx(:,1),:)) ...
', ' , deblank(M_.exo_names(estim_params_.corrx(:,2),:))])]; repmat(', ',ncx,1) , deblank(M_.exo_names(estim_params_.corrx(:,2),:))])];
end end
if ncn if ncn
if isequal(M_.H,0) if isequal(M_.H,0)
...@@ -124,9 +124,9 @@ if ncn ...@@ -124,9 +124,9 @@ if ncn
bayestopt_.p3 = [ bayestopt_.p3; estim_params_.corrn(:,9)]; bayestopt_.p3 = [ bayestopt_.p3; estim_params_.corrn(:,9)];
bayestopt_.p4 = [ bayestopt_.p4; estim_params_.corrn(:,10)]; bayestopt_.p4 = [ bayestopt_.p4; estim_params_.corrn(:,10)];
bayestopt_.jscale = [ bayestopt_.jscale; estim_params_.corrn(:,11)]; bayestopt_.jscale = [ bayestopt_.jscale; estim_params_.corrn(:,11)];
bayestopt_.name = [bayestiopt_.name; cellstr(['corr ' ... bayestopt_.name = [bayestopt_.name; cellstr([repmat('corr ',ncn,1) ...
deblank(M_.exo_names(estim_params_.corrn(:,1),:)) ... deblank(M_.exo_names(estim_params_.corrn(:,1),:)) ...
', ' , deblank(M_.exo_names(estim_params_.corrn(:,2),:))])]; repmat(', ',ncn,1) , deblank(M_.exo_names(estim_params_.corrn(:,2),:))])];
end end
if np if np
xparam1 = [xparam1; estim_params_.param_vals(:,2)]; xparam1 = [xparam1; estim_params_.param_vals(:,2)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment