-
Notifications
You must be signed in to change notification settings - Fork 1
Home
billfreeman44 edited this page Dec 16, 2014
·
15 revisions
Welcome to the mpmcmcfun wiki!
METROPOLIS-HASTINGS algorithm
- calculate initial likelihood
- perturb one parameter
- recalculate likelihood (NOTE: if one of the parameters exceeds one of the limits in parinfo, the likelihood is set to 0)
- if better likelihood, add this set of parameters to the chain
- if worse likelihood, add parameters to chain if random number between 0 and 1 is greater than the ratio of the two likelihoods.
- go back to step 2 until you run out of iterations.
- calculate histogram w/ 50 elements
- fit gaussian to histogram to estimate best value and error.