Markov Chain Monte Carlo sampling of posterior distribution

MCMC sampling of using a cascaded metropolis
3,8K descargas
Actualizado 4 may 2015

Ver licencia

NOTE: I recommend using my new GWMCMC sampler which can also be downloaded from the file exchange:
Markov Chain Monte Carlo sampling of posterior distribution

A metropolis sampler
initialm: starting point fopr random walk
loglikelihood: function handle to likelihood function: logL(m)
logprior: function handle to the log model priori probability: logPapriori(m)
stepfunction: function handle with no inputs which returns a random
step in the random walk. (note stepfunction can also be a
matrix describing the size of a normally distributed
mccount: How long should the markov chain be?
skip: Thin the chain by only storing every N'th step [default=10]

EXAMPLE USAGE: fit a normal distribution to data
logmodelprior=@(m)0; %use a flat prior.
minit=[0 1];
m=mcmc(minit,loglike,logmodelprior,[.2 .5],10000);
m(1:100,:)=[]; %crop drift

--- Aslak Grinsted 2010

Citar como

Aslak Grinsted (2024). Markov Chain Monte Carlo sampling of posterior distribution (, MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux

Inspirado por: Ensemble MCMC sampler

Inspiración para: Ensemble MCMC sampler

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión

updated link in description again

updated GWMCMC link in description

changed description

changed title

Bugfix for small values of skip