I am attempting to create two different matrices using the socialmixr package for different locations (home and other locations). Within this I am using the dplyr's filter function to only consider locations required for the function (each location is a column variable with a corresponding TRUE or FALSE attribute per value. When I run these two matrices for different locations, I am getting the exact same matrices. Are there any ways that people would recommend filtering.
#Home matrix (when someone either has had contact with own household (contact_home) or different household (contact_elsehome))
home_matrix <- contact_matrix(data, filter = list((contact_home=TRUE) | (cnt_elsehome=TRUE)), age.limits, survey.pop, weights)
#Other matrix (where people have had contact on transport or outdoors or the store or other forms of contact)
other_plus_matrix <- contact_matrix(data, filter = list((contact_transport=TRUE) | (contact_outdoor=TRUE) | (contact_store=TRUE) | (contact_other=TRUE)), age.limits, survey.pop, weights)
Please let me know if the filtering notation makes sense and if you would recommend any other types of filtering!