Cross Classification (Level 2) Nested Within Multiple Membership (Level 3)

Hey y’all!

I am very excited to be here starting my brms/stan journey, which I have begun after encountering a particularly gnarly dataset. In general the specification of models in brms seems very straightforward and accessible, and so my question is really more about if I am thinking about the general approach to the model here in a reasonable way for brms.

Specifically, I have what is essentially a three level dataset where scores over time are nested within two qualitatively different types of leaders, whom are then nested within an overarching organization. The kicker is that the leaders at level 2 can (and do!) move across level 3 units as time goes on, and pairs of leaders do not stick together. To get a sense for the data structure I’ve included code below to generate a little hypothetical example tibble. In this example we have school performance scores over time; each score is associated with both a specific principal and vice principal; and the administrators themselves are associated with specific schools. As time goes on principals and vice principals move on to different schools. Within this data structure the overarching question is how specific administrator characteristics (empathy in this example) predict school performance at a given time point, and if these effects differ across principals and vice principals.

I know the example is a little contrived, but we’ll roll with it! Anyway, my issue is moving up from the cross-classified level two to the overarching level 3 cluster, while accounting for movement across level 3 clusters over time. I was specifically wondering if there is a way to set up the level 3 grouping and weighting columns for brms that preserves the fact that there are 2 distinct types of level 2 clustering variables, but that they both funnel up into the same overarching level 3 clustering variable, and move across level 3 groups fairly frequently. Based on my understanding of the multiple membership function here I am not sure if there is a direct way to do this, and that the best approach may be to add an extra, intermediary level for specific administer-school combinations (e.g., principal-school)–that captures the multiple membership–and then have these flow up into the overarching school cluster? So I would have assessments, nested within principal and vice principal, nested within principal/school and vice-principal/school, nested within school. But I may be missing something here!

Thanks so much for any tips, insights, etc.! I know the whole shebang might kinda be overkill here, and I could always just simplify things by eliminating the multiple membership (i.e., resampling different pairs of administrators and schools), but it would be nifty to leverage all that data at once, and is certainly fun to think through from a modeling perspective!

sample_data <- tibble(
  school = rep(1:10, each = 10),
  principal = rep(1:25, each = 2, times = 2),
  vice_principal = rep(1:10, each = 2, times = 5),
  performance = rnorm(100),
  empathy_p = rep(rnorm(25), each = 2, times = 2),
  empathy_vp = rep(rnorm(10), each = 2, times = 5)