I’ve released a short blog about performing posterior predictive checks for models with observation-level random effects (OLREs) (e.g., for over-dispersed counts). This has come up a few times for me while consulting, so I figured I should write it up. The basic idea is that one should do mixed replication, generating new levels of the observation-level random effect using the posterior draws of the hyperparameter but not re-using the fitted OLRE parameters.
I give examples in both PyMC and brms. Critical feedback is welcome!