Large number of divergencies but Rhat, Neff, and result look OK

Groovy!

It’s still bad and the results still shouldn’t be trusted. The divergences indicate that the sampler is trying to go somewhere but it can’t get there.

Make sure and forward these errors to your users so they can understand something is going wrong. Maybe the guidelines say something about this but I imagine that’s the desirable behavior (Guidelines for developers of R packages interfacing with Stan • rstantools).

I haven’t tried this before, but at worst maybe you use the grad_log_prob function to write a leapfrog integrator that runs around the Hamiltonian yourself? That might give you more insight into what is causing things to blow up. You’d need to get the mass matrix from Stan’s adaptation. You can get that from the cmdstan output (and you can dump your R inputs to the cmdstan format with stan_rdump). The “Using multiple step sizes” section of Radford’s HMC shows how to do this: https://arxiv.org/pdf/1206.1901.pdf . That make sense at all?

The usefulness of this has been debated: Getting the location + gradients of divergences (not of iteration starting points) .