7
$\begingroup$

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 drop from the study as soon as the first week of the study ends. 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 are compensated for eating leaves and told that nutrients in leaves would help them sleep well.

$\endgroup$

2 Answers 2

4
$\begingroup$

Just to add to Dimitris' answer, since the study is longitudinal, tracking participants over time introduces an important aspect of the residual error covariance structure. In most software implementing mixed models, the default assumption is compound symmetry, which assumes a constant correlation between any two time points within a subject. However, in longitudinal studies like yours, it's more realistic to expect that correlations diminish as the time interval between observations increases.

Therefore, an Autoregressive (AR(1)) model for the residual variance might be more appropriate. This model assumes that the correlation between observations decreases as the time interval between them increases. It's a more realistic assumption for longitudinal data where the influence of past observations typically diminishes over time.

However, not all mixed model software can handle GLMMs with repeated measures and an AR(1) structure for the residual variance. While nlme (using generalised least squares), the GLIMMIX procedure in SAS, and glmmTMB can accommodate this, the widely used lme4 package in R does not support this kind of modelling (or at least it's very hacky to do so). This limitation is crucial to consider when choosing the software for your analysis.

In summary, while GLMMs can effectively handle the unbalanced dataset in your study, as Dimitris rightly points out, it's equally important to choose the right tool that can model the longitudinal aspect of your data correctly, particularly in terms of the residual error covariance structure.

$\endgroup$
4
  • 1
    $\begingroup$ Hi Robert, in the case of many GLMMs (e.g., as the Poisson one here), assuming random intercepts does not correspond to compound symmetry (i.e., constant marginal correlations) because the variance is a function of the mean that varies over time. $\endgroup$ Commented Nov 20, 2023 at 20:20
  • $\begingroup$ @DimitrisRizopoulos Ahhh, good point ! I had forgotten about that ! $\endgroup$ Commented Nov 20, 2023 at 20:24
  • 1
    $\begingroup$ @DimitrisRizopoulos do you think such a covariance structure is what SAS calls "Heterogeneous compound symmetry", where variances, along the diagonal of the matrix, do not have to be the same ? $\endgroup$ Commented Nov 20, 2023 at 20:32
  • 1
    $\begingroup$ I would say that a "Heterogeneous compound symmetry" would imply that the correlations between any pair of measurements will be the same but the variances could be different. $\endgroup$ Commented Nov 20, 2023 at 20:39
7
$\begingroup$

Generalized Linear Mixed Models (GLMMs) work with unbalanced datasets like the one you describe. They will provide valid inferences when the missing data mechanism is Missing At Random (MAR). MAR, in plain words, means that the reasons why a participant will drop out on a specific day relate only to the observed counts from the previous days. In other words, GLMMs assume that you can predict the missing counts of a participant from the ones you have observed for them.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.