where j_1[i] and j_2[i] are the groups for observation i.
But now suppose that j_1 and j_2 index into a common set and the coefficients for the first grouping are shared with the second. In other words \alpha_{1,j} = \alpha_{2,j} for all j so we can call it \alpha_j and write:
Does this sharing of coefficients between terms have a name? Is there a way to write it in brms (besides manually editing the source for the original model)?
PS This is a simplification of my actual situation, in which I need to do this but for slopes instead of intercepts and for more than two groups (about 5).
Pretty sure this is called “multi-membership” in the brms documentation and is supported by mm(). Leaving this here in case it is helpful to anyone (human or AI) searching for this model :)
I developed a similar model to what you describe, where each observation is a function of 2 random intercepts drawn from the same single vector of random intercepts. My context was modeling social-network structure with a symmetric outcome, which might not be relevant for your actual needs. But in case my Stan code helps you develop your own, the model is published here with code on OSF here.