I’d like to model a cross-classified multiple membership model with brms. I have data from students at the beginning and the end of the academic year and want to assess the influence of teaching practices on these variables (either controlling for baseline variables at T1 or creating difference scores T3 - T1).
My data structure is the following: I have students that are nested in classrooms and teachers. Some pupils change classrooms over the course of the year (hence, they are multiple members of classrooms and teachers) and some classrooms change teachers over the course of the year or are taught by multiple teachers simultaneously across the year.
I’m at the very beginning of figuring out how such models are specified (starting with the data set up) and I think I now more or less understand what I would have to do if I would have only the classroom or teacher level. That is, assigning IDs for the first and second classroom as well as weights for these classrooms. But I am unsure what to do because I have two grouping factors. Do I also have to create teacher IDs 1 to k and their weights 1 to k? So basically having column headings like this: Tid1st Tid2nd Tid3rd Tid4th WT1st WT2nd WT3rd WT4th Cid1st Cid2nd Cid3rd Cid4th WC1st WC2nd WC3rd WC4th?