From bd630d721030c327b1e9baf40e607dd8ba8208d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Scylla=29?= Date: Tue, 26 Nov 2013 12:56:41 +0100 Subject: [PATCH] Removed MC_record field from oo_ structure and the output argument from MCMC routines. Details about the MCMC can be loaded in the workspace with the following command: >> internals --load-mh-history under the name mcmc_informations, or printed in the command window, using the following command: >> internals --display-mh-history --- doc/dynare.texi | 16 ---------------- matlab/dynare_estimation_1.m | 2 +- matlab/independent_metropolis_hastings.m | 5 +---- matlab/random_walk_metropolis_hastings.m | 5 +---- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index 0968c778d..4e61efe6a 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -5268,22 +5268,6 @@ oo_.posterior_mean.shocks_std.ex oo_.posterior_hpdsup.measurement_errors_corr.gdp_conso @end example -@defvr {MATLAB/Octave variable} oo_.MC_record.Seeds -Variable set by the @code{estimation} command. Stores seeds used in MCMC chains -@end defvr - -@defvr {MATLAB/Octave variable} oo_.MC_record.AcceptationRates -Variable set by the @code{estimation} command. Stores acceptation rates of the MCMC chains -@end defvr - -@defvr {MATLAB/Octave variable} oo_.MC_record.LastParameters -Variable set by the @code{estimation} command. Stores parameter vector of final MCMC chain draw -@end defvr - -@defvr {MATLAB/Octave variable} oo_.MC_record.LastLogPost -Variable set by the @code{estimation} command. Stores log-posterior of final MCMC chain draw -@end defvr - @defvr {MATLAB/Octave variable} oo_.RecursiveForecast @anchor{RecursiveForecast} Variable set by the @code{forecast} option of the @code{estimation} command when used with the nobs = [@var{INTEGER1}:@var{INTEGER2}] option (@pxref{nobs1,,nobs}). diff --git a/matlab/dynare_estimation_1.m b/matlab/dynare_estimation_1.m index f6df44b87..1ceae181d 100644 --- a/matlab/dynare_estimation_1.m +++ b/matlab/dynare_estimation_1.m @@ -792,7 +792,7 @@ if (any(bayestopt_.pshape >0 ) && options_.mh_replic) || ... ana_deriv = options_.analytic_derivation; options_.analytic_derivation = 0; if options_.cova_compute - oo_.MC_record=feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_); + feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_); else error('I Cannot start the MCMC because the Hessian of the posterior kernel at the mode was not computed.') end diff --git a/matlab/independent_metropolis_hastings.m b/matlab/independent_metropolis_hastings.m index af91b5084..4f9b42493 100644 --- a/matlab/independent_metropolis_hastings.m +++ b/matlab/independent_metropolis_hastings.m @@ -1,4 +1,4 @@ -function record=independent_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin) +function independent_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,varargin) % Independent Metropolis-Hastings algorithm. % @@ -10,9 +10,6 @@ function record=independent_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv % o mh_bounds [double] (p*2) matrix defining lower and upper bounds for the parameters. % o varargin list of argument following mh_bounds % -% OUTPUTS -% o record [struct] structure describing the iterations -% % ALGORITHM % Metropolis-Hastings. % diff --git a/matlab/random_walk_metropolis_hastings.m b/matlab/random_walk_metropolis_hastings.m index e7ec0a2c0..3e84ce1d9 100644 --- a/matlab/random_walk_metropolis_hastings.m +++ b/matlab/random_walk_metropolis_hastings.m @@ -1,4 +1,4 @@ -function record = random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_) +function random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_) %function record=random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1,vv,mh_bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_) % Random walk Metropolis-Hastings algorithm. % @@ -14,9 +14,6 @@ function record = random_walk_metropolis_hastings(TargetFun,ProposalFun,xparam1, % o estim_params_ estimated parameters structure % o bayestopt_ estimation options structure % o oo_ outputs structure -% -% OUTPUTS -% o record [struct] structure describing the iterations % % ALGORITHM % Metropolis-Hastings.