Casal2/CASAL2

Test HMC algorithm

Craig44 opened this issue · 1 comments

Describe the bug
Recent MCMC investigations, have found what looks to be incorrect implementation of the HMC algorithm. A log warning has been added to the class found here. The problem occurs when casal2 is saving the state of the chain in an iteration that is a keep (based on thinning). If the current candidate is rejected, Casal2 saves the value of the chain from the last accepted that landed on a keep see here. We believe this is incorrect and Casal2 needs to create a new link for the chain that is based on the last accepted iteration. Not the last accepted that landed on a keep iteration.

HMC doesn't use keep (no thinning) so this implementation looks correct.