Hi,

I developed a complex piecewise model using BRMS and I would like to make predictions. Following this discussion, I am stuck with the as.matrix(diag()) step since it only retrieves 8000 predictions from the first 8000 combinations of factors (over 24000 combinations), and discarding 2/3 of the factors of a categorical variable (my posterior draws matrix is 8000*24000).

Instead of using diag(), can I sample 8000 times the posterior matrix systematically across my 24000 combinations (so every 3 columns here) so I am sure that I sample all the combinations and not a biased subset?

Apologies if I misunderstood something.

Thanks,

Steph