grinsted / gwmcmc

An implementation of the Goodman & Weare MCMC sampler for matlab
Other
51 stars 24 forks source link

Q: inference with bounded variables #5

Closed drbenvincent closed 8 years ago

drbenvincent commented 8 years ago

Great job on this. Does this algorithm allow for variables with a bounded range, say between 0-1. If so, is this implemented through a prior with zero values outside of this range? Thanks.

grinsted commented 8 years ago

Yes, you have to implement it as a prior. In this example the kinkpoint is constrained to be inside the observational period by the prior: https://github.com/grinsted/gwmcmc/blob/master/html/ex_breakfit.md