In the multilevel vignette, there is a discussion of multiple membership weights in Example 4.
For students who went to a single school during the study period, the data is organized as follows:
data_mm[101:106, ]
s1 s2 w1 w2 y
101 2 2 0.5 0.5 27.247851
102 9 9 0.5 0.5 24.041427
103 4 4 0.5 0.5 12.575001
104 2 2 0.5 0.5 21.203644
105 4 4 0.5 0.5 12.856166
106 4 4 0.5 0.5 9.740174
In other words, this could be read as student 101 spending 50% of the time in School 1 and the other 50% of the time in School 2.
However, would the model give equivalent estimates if the weights were 1 and 0, respectively. Accordingly:
data_mm[101:106, ]
s1 s2 w1 w2 y
101 2 2 1 0 27.247851
102 9 9 1 0 24.041427
103 4 4 1 0 12.575001
104 2 2 1 0 21.203644
105 4 4 1 0 12.856166
106 4 4 1 0 9.740174
In my experience, that is a more natural way of organizing the data. But that depends on whether the structures would result in equivalent inferences in BRMS. Thanks again.
- Operating System: Mac OS
- brms Version: 2.7