Skip to content
billfreeman44 edited this page Dec 16, 2014 · 15 revisions

Welcome to the mpmcmcfun wiki!

METROPOLIS-HASTINGS algorithm

  1. calculate initial likelihood
  2. perturb one parameter
  3. recalculate likelihood (NOTE: if one of the parameters exceeds one of the limits in parinfo, the likelihood is set to 0)
  4. if better likelihood, add this set of parameters to the chain
  5. if worse likelihood, add parameters to chain if random number between 0 and 1 is greater than the ratio of the two likelihoods.
  6. go back to step 2.
Clone this wiki locally