Reasonable success rate in MCMC sampling

Hello, While debugging a model that seems to have some ergodicity issues, we realized that our model has about a 10% sample success rate. We require 1000 samples to be accepted, with 300 warmup samples, and we can see via debug information that there are about 10,000 samples offered in the MCMC sampling.

Is this success rate reasonable? If not, what success rate would be expected for a ‘good’ model?

Thanks!

Hi, @s-hoyt and welcome to the Stan forums.

I’m not sure which Stan interface you’re using, so I can’t be specific, but you want to evaluate the R-hat convergence diagnostic statistics—those should all be very close to 1 (1.01 is OK, 1.05 is dodgy). Then the thing you care about is the effective sample size—that measures the strength of your sample in terms of an equivalent number of independent draws. That is mainly of interest as it controls the standard error on expectation estimates, such as parameter estimates. Stan reports the standard errors, which is just posterior standard deviation over the square root of the effective sample size.

If you share your model, we can help diagnose what might be going wrong.