# Should I weight points in a mixed model to account for groups having different numbers of points?

My research investigates the carriage of Salmonella by raccoons captured on multiple occasions. I am interested in modelling the relationship between sampling interval (number of days between two captures) and the odds of a change in Salmonella serotype. My hypothesis is that a longer sampling interval is more likely to be associated with a change in serotype.

My question is related to how to generate this new variable. Is it valid to use all pairwise combinations of capture dates to generate sampling interval data? Although I was planning to account for clustering by raccoon using a random effect, I am concerned about the fact that I will be generating a LOT more data for certain raccoons which are captured 8 times (for example) as compared with raccoons which are only capture 2 times.

Is there any way to weight the new data I have generated by the number of captures? (to ensure that I have generated a proportional amount of new data using the existing data).

Could I use the weights option using glm in R?

• I think you have to be clear about how you define "change" in Salmonella serotype. Is it change relative to the date of the first capture? Change relative to the date of the most recent capture? Change relative to any of the previous captures? Your definition of change should determine how you define your "sampling interval". – Isabella Ghement Jul 15 '19 at 2:08
• As an example, If you define "change" relative to the date of the first capture, then you only need to create "sampling intervals" which pair the date of the first capture with the dates of all subsequent captures. – Isabella Ghement Jul 15 '19 at 2:12
• Can you include the number of captures as a racoon-level covariate in your mixed effects model? – Isabella Ghement Jul 15 '19 at 2:21