How to use the posterior predictive distribution for checking a model from PyMC

In reply to OriolAbril:
Sounds great, but the idata I get after running the program (as I wrote it) contains only:

  • posterior
  • predictions
  • sample_stats
  • observed_data
    I guess this is why when I run your line
az.plot_bpv(idata, kind="t_stat", t_stat=np.max)

I get an error saying:

`data` argument must have the group "posterior_predictive"

Surely because this group is not present in my idata
I probably missed something in my code, isn’t it right?