1
$\begingroup$

I have been asked to perform a GLMM to study which conditions most influence certain behaviors in captive animals. The dependent variable is the time spent on each behavior during a 10-minute observation.

There are many fixed factors (e.g., presence/absence of visitors, weather, etc.) and some random factors. The researchers have described sex, age, and subject ID as random factors.

Questions:

-Does it make sense to categorize sex and age as random factors?

-Is GLMM the best option in this case? The time spent on each activity is not normally distributed, ranging from 0-1 (percentage of time spent in the activity), and we have repeated measures data (each subject was observed multiple times under different conditions), so I believe it's the right choice.

-If I proceed with a GLMM, which family of distributions would be the best fit for modeling the dependent variable? Poisson?

  • How much do I need to worry about the assumptions when using a GLMM?

Thanks for your help. I have performed generalized and mixed linear models before, but I’m not very familiar with GLMMs.

$\endgroup$
1
  • $\begingroup$ Re: your first question: if you mean using sex and age as random effect grouping variables (i.e. you want to estimate intercept and maybe slope for both sexes and each age level), this won't work for sex because it only has 2 levels and you'd typically need at least 5-6 for reliable estimation of random effects. If age is continuous, that also won't work because you can't use a continuous variable as random effect grouping variable. $\endgroup$
    – Sointu
    Commented Sep 20 at 10:30

1 Answer 1

7
$\begingroup$

Although the terminology around "fixed" and "random" can get confusing, I don't think it makes much sense to say that sex or age are random. Nut I prefer looking at models like this as multilevel models, rather than mixed. It just seems clearer in my head. In any case, you should look at the actual equation behind the model.

Since you have repeated measures, you need to account for the dependence of the errors. A multilevel model is one way to do that. In your title, you mention Poisson, but that is usually for count data, not proportion data. Beta regression might be good (it works with variables that are bounded by 0 and 1).

$\endgroup$
1
  • 3
    $\begingroup$ Agreed. Further note, if OP has values of exactly 0 or 1 (i.e. animal performed the behaviour 0% or 100% of the time) then they will need to jump through some additional hoops, e.g. use an ordered beta (family = "ordbeta in glmmTMB, or a zero-(one?)-inflated beta distribution) $\endgroup$
    – Ben Bolker
    Commented Sep 20 at 12:50

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.