Hello! I am trying to fit a multiple membership multilevel logistic model, in which individuals are nested within states, and move to different states over four years. I also have repeated measures of a binary outcome. I am wondering how to prepare the data for this model? To fit a multiple membership model using brms, I know that you need to have data in a wide format, however, it seems that to fit a repeated measures model using brms you need to have the data in long format.
Thanks!
I’m not exactly sure what you mean. You’ll want columns for membership classifications and the corresponding weights for each measurement occasion.
Check out example #4 from @paul.buerkner 's paper on MLMs in brms here.
For background and/or notation, check out this paper.
There is a module on multiple membership models in a free course from Bristol’s Centre for MLM; follow the link on the last page of this document to see several examples.