residual simulations and posterior check