diff --git a/matlab/estimation/get_posterior_parameters.m b/matlab/estimation/get_posterior_parameters.m index ffec01826c5485dbe5c17b7591bfbf418cb09ddf..84d4c098ead59704f91cce9e1cf9637a3b38725f 100644 --- a/matlab/estimation/get_posterior_parameters.m +++ b/matlab/estimation/get_posterior_parameters.m @@ -7,7 +7,9 @@ function xparam = get_posterior_parameters(type,M_,estim_params_,oo_,options_,fi % o type [char] = 'mode' or 'mean'. % o M_: [structure] Dynare structure describing the model. % o estim_params_: [structure] Dynare structure describing the estimated parameters. -% o field_1 [char] optional field like 'mle_'. +% o oo_: [structure] Dynare results structure +% o options_: [structure] Dynare options structure +% o field_1 [char] optional field like 'mle_'. % % OUTPUTS % o xparam vector of estimated parameters @@ -15,7 +17,7 @@ function xparam = get_posterior_parameters(type,M_,estim_params_,oo_,options_,fi % SPECIAL REQUIREMENTS % None. -% Copyright © 2006-2018 Dynare Team +% Copyright © 2006-2025 Dynare Team % % This file is part of Dynare. % @@ -76,8 +78,6 @@ for i=1:ncn m = m+1; end -FirstDeep = m; - for i=1:np name1 = M_.param_names{estim_params_.param_vals(i,1)}; xparam(m) = oo_.([field1 type]).parameters.(name1); diff --git a/matlab/estimation/marginal_density.m b/matlab/estimation/marginal_density.m index eb8443a343ec674f1b093f963087792410d974ab..e0785f836e7e2e466a9be4d8369b8650967186ef 100644 --- a/matlab/estimation/marginal_density.m +++ b/matlab/estimation/marginal_density.m @@ -3,10 +3,11 @@ function [marginal,oo_] = marginal_density(M_, options_, estim_params_, oo_, bay % Computes the marginal density % % INPUTS +% M_ [structure] Dynare model structure % options_ [structure] Dynare options structure % estim_params_ [structure] Dynare estimation parameter structure -% M_ [structure] Dynare model structure % oo_ [structure] Dynare results structure +% bayestopt_ [structure] describing the priors % outputFolderName [string] name of folder with results % % OUTPUTS @@ -16,7 +17,7 @@ function [marginal,oo_] = marginal_density(M_, options_, estim_params_, oo_, bay % SPECIAL REQUIREMENTS % none -% Copyright © 2005-2023 Dynare Team +% Copyright © 2005-2025 Dynare Team % % This file is part of Dynare. % @@ -64,7 +65,7 @@ if ~isfield(oo_,'posterior_mode') || (options_.mh_replic && isequal(options_.pos end % save the posterior mean and the inverse of the covariance matrix -% (usefull if the user wants to perform some computations using +% (useful if the user wants to perform some computations using % the posterior mean instead of the posterior mode ==> ). parameter_names = bayestopt_.name; save([M_.dname filesep outputFolderName filesep M_.fname '_mean.mat'],'xparam1','hh','parameter_names','SIGMA');