This enables re-using estimation functions for other Bayesian estimation routines such as Bayesian method_of_moments and printing it nicer to the console.
This commit only changes the routine used to draw random deviates from
the prior distribution, without relying on persistent variables (which allows
parallelisation).
It is now supported by the MATLAB editor (as of R2022a).
The old ASCII notation is left in some files that we copy as-is from other
sources (e.g. in the contrib/ and m4/ subdirectories).
The particles submodule is not updated at this point, because it is in an
inconsistent state.
[skip ci]
- handle sub lists of individual samplers
- split checks in dynare_estimation_init.m and before running posterior_sampler.m [invhess checks]
- posterior sampler options checks moved from initial_estimation_checks.m to check_posterior_sampler_options.m
- added use_mh_covariance_matrix to imh and rwmh
- slice re-sets mode_compute=0 cova_compute=0
- updated test function
It generalizes the random_walk_metropolis_hastings.m structure but adds two new items:
- check_posterior_sampler_options.m which is a wrapper for method specific options (stored in options_.posterior_options)
- posterior_sampler_iteration.m which is a wrapper of the individual iteration of any posterior sampler.
It already embeds, with parallelization implementation:
- random_walk metropolis hastings
- independent metropolis hastings
- slice sampler
It also contains a quick fix for TARB, although the latter should be embedded in posterior_sampler_iteration.m as well.
Any new posterior sampler can be simply added to posterior_sampler_iteration.m, with wrapper to specific iterations in check_posterior_sampler_options.m