Posterior predictive checks

I did not mean to imply changing that function. That is most probably too involved for you. Rather, that function rather executes the simulation with the

posterior_function_demo

you wrote. What I meant is returning within

posterior_function_demo

the posterior draws

output_cell{1,1}=xparam1;

You can do this for the two estimations you ran separately. That gives you the posterior draws. Afterwards, you can loop over these draws, e.g. [Loop over parameters)