Ordering of chains and iterations in brms posterior samples

What is the order in which iterations and chains are presented in a dataframe of posterior samples from a brms object?

I presume that if I had 4 chains with 1000 post warm-up iterations, the posterior samples would be ordered like: 1:1000 of chain 1, 1:1000 of chain 2, 1:1000 chain 3 etc.

I just wanted to confirm that this intuition is correct before I start sampling from the posterior!

Say you have a brms model saved as my_fit. You can inspect your chains and iteration information with posterior_samples(my_fit, add_chain = TRUE).

Perfect – thanks @Solomon !

1 Like