Sample size estimation

Until now I have only used arbitrary sample sizes that lead to reasonably identical chains in the posterior distribution. Is there a rule of thumb on the number of sample size needed for a model?

Thank you!

It depends how accurate results you need.

I would recommend that minimum ess (tail or bulk) is at least > 100 for the model. Also make sure that MCSE (monte carlo standard error) is in suitable magnitude.


For most simple models, tune=2000 and draws=1000 is a good default, all the more so if you’re doing parallel sampling.

thank you so much for the reply! do you have any good place to look for theory supporting this?

Not really – I know it’s a recommendation Chris Fonnesbeck (PyMC’s BDFL) often makes. Richard McElreath also wrote about it in Rethinking, in the chapter on MCMC if I remember correctly.