GLM: Hierarchical Linear Regression - Posterior Predictive Check - RMSD

I’m one of the authors, sorry for the late reply, hadn’t seen this thread.

As it’s been quite a while since I wrote this I don’t remember how exactly we did it and why we didn’t include the code. Intuitively I’d do it just like @carlossouza did but it’s surprising that it’s not on the same scale.

I would also make sure to use the non-centered version: Why hierarchical models are awesome, tricky, and Bayesian — While My MCMC Gently Samples so that there are no convergence issues affecting this.

Ultimately I wouldn’t be surprised if, after rerunning this years later, the results change slightly and maybe the hierarchical one does not beat the flat one. Any reason this is important to you?