I’m going through the statistical rethinking notebooks and I’m not sure I quite understand what’s happening in cell Out[17] of chapter 11, 11.16 link

```
with m11_4:
pm.set_data({"actor_id": np.repeat(range(7), 4), "treat_id": list(range(4)) * 7})
p_post = pm.sample_posterior_predictive(
trace_11_4, random_seed=RANDOM_SEED, var_names=["p"]
)["p"]
p_mu = p_post.mean(0).reshape((7, 4))
```

I’m not sure I understand what `pm.set_data`

is doing in this particular case. I’m also not sure I understand why we need to sample from the posterior_predictive – don’t we have samples from `p`

in the trace?

Thanks for the help, as a noob I’m stumbling a bit here.