Page 1 of 1

Gibbs sampling

PostPosted: Wed May 04, 2011 8:20 pm
by gbel
Hi,

For large models, Metropolis-Hastings alone may not be as efficient as it would, combined with Gibbs sampling. The following files permit the use of Gibbs sampling within MH.

To use, copy the four files on your path and, in your mod-file, add the options:
Code: Select all
options_.posterior_sampling_method = 'gibbs_random_walk_metropolis_hastings';

or
Code: Select all
options_.posterior_sampling_method = ' gibbs_independent_metropolis_hastings';

and
Code: Select all
options_.gibbs = [ [ones(25,1) ; zeros(75,1)] [zeros(25,1) ; ones(25,1) ; zeros(50,1)]  [zeros(50,1) ; ones(25,1) ; zeros(25,1)] [zeros(75,1) ; ones(25,1)] ];


This example is for 100 parameters estimated in 4 sample blocks. The ones and the zeros tell the code which block and when. You can put a different number than one to modify the jscale for that block only (it will be multiplied with the original jscale).

Hope this is useful
Gilles

Re: Gibbs sampling

PostPosted: Tue Jan 03, 2012 10:50 am
by alwaysbok
Thank you for this m file
please let me know the reference papers for the Gibbs sampling within MH.
and is it possible to use the m files for DSGE model??

Re: Gibbs sampling

PostPosted: Tue Jun 05, 2012 7:42 pm
by gbel
Hi,

Sorry for the really late reply, you can look at this:
Code: Select all
http://www.dynare.org/events/paris-1005/dynare-lectures-zha.pdf


Gilles

Re: Gibbs sampling

PostPosted: Sun Aug 24, 2014 8:43 am
by jonathanb
Dear Gbel or others,
do you have an updated version of this code that is adapted to new Dynare versions ?
Is there another way to compute Gibbs sampling through Dynare ?
Best,
Jonathan