Parameter contrasts in Bayesian linear regression model using brms

Thank you very much for fast confirming. I am still struggling how to extract the same information using posterior_predict, meaning the same information that I get when using pp_check with the stat_grouped type argument and the argument group being set to the factor that I want to check for “significance”.

When using the newdata argument of posterior_predict it seems I cannot select only one factor and then get two columns, one for each of the two outcome (TRUE/FALSE). If I generate two distributions via posterior_predict, one for TRUE and one for FALSE, and then subtract them, I don’t get the same output as with ppcheck. Actually, I tried to understand how ppcheck is generating the posterior values to compare it with posterior_predict but did not manage to figure it out from the source code.

Is there anything wrong in my way of approaching this or can you give a pseudo example how to use posterior_predict for that purpose?