With a bounded prior, invalid proposals are accepted after a MH step. This happens to all samplers involving a MH step.
As seen in the following plot, an invalid proposal, negative here, is accepted after a MH step, which is not supposed to happen, and then the sampler gets stuck there.
Description
With a bounded prior, invalid proposals are accepted after a MH step. This happens to all samplers involving a MH step.
As seen in the following plot, an invalid proposal, negative here, is accepted after a MH step, which is not supposed to happen, and then the sampler gets stuck there.
Example to reproduce
DoD
isnan
andisinf
at MH steps in relevant samplers, i.e., MH, CWMH, MALA, NUTS