Zero weights in multiple membership models


#1

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

#2

EDIT: I understand your question now. You were referring to students who just attend a single school. In that case, indeed the weights don’t matter (as long as they sum to 1).


#3

Right. Thanks, Paul. In keeping with the school study, some students switch schools but I was wondering if I could organize the data like the above example (with zero weights) in some columns for students who didn’t switch schools.

Am I understanding correctly that every “s” column needs an ID even if its corresponding weight is zero? In other words, brm() wouldn’t work well if there were NA values (or zeroes) in the s2 column for students that didn’t switch, is that right?


#4

Right, sorry I misunderstood you initial question (please see my EDIT above). And you are also right that brms won’t work well with NAs both in the ID and in the weights columns.