Sampler Diagnostics

Betanalpha wrote:

So the divergence does influence how the sample is chosen.

The quote is from here:

I’ve now solved this problem, at least provisionally, by changing your oneSampleNuts function to check for divergence in addition to U-turn before merging in a new subtree. I hope this is close to how Stan does it.