Gibbs sampling
Posted: Wed May 04, 2011 8:20 pm
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:
or
and
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
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