0

I am fitting a glmer with error distribution and log link to test the effect of male group (treated, control) on the time spent on a specific reproductive behaviour (seconds, thus integer counts). My random factor is represented by the female identity since the same female is coupled with both a treated and a control group.

glmer<-glmer(behaviour~group + (1|ID_female), family=poisson, data=behaviour)

Since the model is overdispersed: 3364.749 on 12 degrees of freedom (ratio: 280.396), I introduce a second observation level random factor:

glmer<-glmer(behaviour~group + (1|ID_female) + (1|observation),family=poisson, data=behaviour)

In this way I correct for overdispersion (Residual deviance: 3.08 on 11 degrees of freedom, ratio: 0.28), but I get the warning of singular fit:

boundary (singular) fit: see ?isSingular

How could I deal with this in a different way? Thank you very much.

massisenergy
  • 1,764
  • 3
  • 14
  • 25
L.Loc
  • 1
  • 2
  • possible to use `rstanarm` to fit using STAN, and then compare estimates from both methods when encountering singular fits. – Michael Roswell Mar 31 '20 at 16:21
  • did you consider `glmer.nb`? – Michael Roswell Mar 31 '20 at 16:22
  • I did with glmer.nb<-glmer.nb(time_shallow_together~group +(1|ID_female), data=behaviour). No observation level random effect. I still get singular fit warning – L.Loc Mar 31 '20 at 16:22
  • Also, did you play with optimizers in `lme4`? Sometimes you get lucky with one. – Michael Roswell Mar 31 '20 at 16:23
  • if you're really stuck, you could also consider flipping the question (making sex the response variable, and group and behavior predictors). It's possible using a binomial response you can get farther with the data you have, given the overdispersion in the behavior variable. – Michael Roswell Mar 31 '20 at 16:25
  • This could also be a good question for CrossValidated – Michael Roswell Mar 31 '20 at 16:27
  • I am not a good player with optimizers, but I will try. I also posted in CrossValidated. – L.Loc Mar 31 '20 at 16:35
  • No way, still getting singular fit warning also with all available optimisers. Anyway, I guess the problem is in the low number of observations (16 in total, 8 per male group). Models with more than one random factor will be always overfitted. But this is what I have – L.Loc Mar 31 '20 at 16:51
  • Maybe you can give a bit more info on your data and research question? I'm wondering if you need a random effect at all.. why is the female group a random effect? – Michael Roswell Mar 31 '20 at 16:56
  • Yes, you are true. I do not necessary need to keep female as a random factor. Easy, indeed – L.Loc Mar 31 '20 at 17:05

0 Answers0