I want to know how to use Poisson GLMMs when we have unequal samples available for different groups/clusters/participants in data.
Imagine a study where each of the 60 participants are given 1000 medicinal leaves and are asked to report the number of leaves (count
) they eat on each day for the next 20 days from the beginning of the study. We record participants' weights (w
) at the start of the study, assume it to be stable over the next 20 days and hypothesise that weight should not have any effect on every day leaf consumption. However, we also want to model the every day consumption since we expect that participants would not like taste of the leaves at the beginning. So, we use day
as a covariate along with w
i.e. in nlme
notation using lme4::glmer
:
poisson.fit <- glmer(count ~ w + day + (1 | id), family = poisson)
However, 40 participants dropsdrop from the study as soon as the first week of the study endedends. 10 others stop recording their consumption after 15 days from the start and few others within the next few days. At last, there are only 5 participants for whom we could collect the data for the entire duration of 20 days. Given this heterogeneity in the number of samples we could obtain for different participants, how should I model the effect of day
on count
? Would the random effect (1 | id)
take care of this unequal sampling?
We can additionally assume that all 60 participants wereare compensated for eating leaves and told that nutrients in leaves would help them sleep well.