Commit Graph

22 Commits (7dd2dd5e24a343fbeaf3522ea5e535c27d8b9f95)

Author SHA1 Message Date
Johannes Pfeifer df09084a89 posterior_sampler_initialization.m: save missing ProposalCovariance for mh_recover 2022-07-28 11:12:18 +02:00
Sébastien Villemot 10af04c6d8
Use Unicode copyright symbol (in UTF-8 encoding) in all source files
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]
2022-04-13 14:54:25 +02:00
Sébastien Villemot 766fff88f6
Use secure URL for link to GNU licenses 2021-06-09 17:35:05 +02:00
Marco Ratto a0f2b2399b
New option mh_initialize_from_previous_mcmc that allows to pick initial values for a new MCMC from a previous one
If an additional parameter is estimated, it is initialized using prior_draw.
2021-05-11 18:48:43 +02:00
Johannes Pfeifer fa739c3a63 posterior_sampler_initialization.m: update record if different sampler is used
Also removes redundant field
2021-01-22 15:01:23 +01:00
Johannes Pfeifer c78890d5ca posterior_sampler_initialization.m: Allow running different samplers after each other
Transform error to warning
2021-01-22 15:01:22 +01:00
Johannes Pfeifer 32bdb82cf8 Make load_mh_file honor use_mh_covariance option 2021-01-22 15:01:02 +01:00
Johannes Pfeifer 9e5cb1422d
Save jscale to record structure before running MCMC
Useful in conjunction with mh_tune_jscale in cases where the posterior sampler crashes
2020-02-29 10:28:50 +01:00
Sébastien Villemot 49dc997073
Global reindentation of MATLAB code (excluding submodules)
Also convert to Unix end-of-lines, and remove trailing whitespaces.
2019-12-20 16:30:27 +01:00
Marco Ratto da4baa5d50 make mh_recover robust to crashed parallel jobs 2019-12-12 22:24:30 +01:00
Johannes Pfeifer d4ed77c67e posterior_sampler_initialization.m: provide missing function input
Fixes #1622
2019-09-06 23:03:07 +02:00
Marco Ratto 47900a5909 trap slice sampler when doing mh_recover
(cherry picked from commit 4ba9c9296f1939fa14b1401886d9e9b86541e5e3)
2019-01-17 09:50:07 +00:00
Stéphane Adjemian (Charybdis) 5417b27ac7 Fixed indentation of matlab files. 2017-05-16 15:10:20 +02:00
Stéphane Adjemian (Charybdis) a53636e24e Fixed copyright notices. 2017-05-16 14:11:15 +02:00
Stéphane Adjemian (Charybdis) 88e1701289 Removed useless commas and semicolons. 2017-05-16 13:24:46 +02:00
Marco Ratto 0a40cdf064 Bud fix for cases where record does not contain proposal covariance. 2016-11-07 17:18:41 +01:00
Johannes Pfeifer 7ff6c5b2b7 Cosmetic change to posterior_sampler_initialization.m 2016-10-03 22:10:00 +02:00
Johannes Pfeifer b3877b3a9e Save chain's proposal density and make load_mh_file and mh_recover load it
Closes #504
2016-06-14 15:09:05 +02:00
Marco Ratto 7b3c42c6e1 provisions for reworked posterior sampling options:
- 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
2016-05-19 14:37:05 +02:00
Marco Ratto 4445f17efa Manual merge with commit history of metropolis_hastings_initialization.m and random_walk_metropolis_hastings_core.m 2016-05-19 14:34:09 +02:00
Marco Ratto 357e3c2ac7 Make posterior_sampler_initialization.m compatible with new form of prior_draw.m 2016-05-19 14:34:09 +02:00
Marco Ratto c30b6f20a6 Added routines that factor out posterior samplers into the iteration routine posterior_sampler_iteration.m.
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
2016-05-19 14:34:09 +02:00