Hi,

I’m estimating a multivariate model with two grouping terms in which different outcomes are predicted by some shared predictors as well as one predictor that differs between all formulas. So far, I have been using the |ID|-Syntax to model group-level terms as correlated. However, I am not actually sure what the reason behind this is and whether it should always be done or not. It would be great if someone could explain this in more detail. My syntax looks somewhat like this

bf_1 <- bf(y1 ~ 0 + Intercept + y1lagged + x1 + x2 + x3 + (0 + Intercept + y1lagged + x1 + x2 + x3 |ID1| Teach) + (0 + Intercept + y1lagged + x1 + x2 + x3 |ID2| Class), family = skew_normal())

bf_2 <- bf(y2 ~ 0 + Intercept + y2lagged + x1 + x2 + x3 + (0 + Intercept + y2lagged + x1 + x2 + x3 |ID1| Teach) + (0 + Intercept + y2lagged + x1 + x2 + x3 |ID2| Class), family = skew_normal())

bf_3 <- bf(y3 ~ 0 + Intercept + y3lagged + x1 + x2 + x3 + (0 + Intercept + y3lagged + x1 + x2 + x3 |ID1| Teach) + (0 + Intercept + y3lagged + x1 + x2 + x3 |ID2| Class), family = skew_normal())

model <- brm(bf_1 + bf_2 + bf_3, data=data)

When should I use the ID-Syntax and when is the simple “|” enough?

Thanks