0
$\begingroup$

I built a generalized linear mixed model using the code:

detect_global <- glmer(outcome ~ season*year + season*sex + sex*year + (1 | obsname) + (1 | bird), 
     data = detect, 
     family = binomial)

Season is a 3-level factor (molting, breeding, and winter), year is a 3-level factor (2019, 2020, and 2021), sex is a 2-level factor, and obsname and bird are random effects. Bird is a 4-letter ID for each bird in the study (~50), and obsname is an ID for each observer in the study (5). Each bird was sample a minimum of 25 times.

Then, I used the MuMIn::dredge function to produce a list of all possible models, ranked by AICc. However, I receive this warning when I run the code:

Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.00204414 (tol = 0.002, component 1)

If I include main effects only and get rid of the interactions, this warning disappears. If I run a model with interactions but exclude bird as a random effect, the warning also disappears. Does that mean I have to run main effects only or exclude bird, or is there a way to correct this?

$\endgroup$
1
  • 1
    $\begingroup$ Here are some answers. As a general proposition, procedures that automatically include large numbers of variables or posit large numbers of models in a search tend to turn up instances that are unstable. This can happen even with huge datasets. $\endgroup$
    – whuber
    Nov 19, 2021 at 18:14

1 Answer 1

0
$\begingroup$

You can attempt to fit a model with the same variance-covariance structure using generalized estimating equations (GEE). Perhaps this method will converge for your full model and its inadequacies can be tested (i.e. inclusion of fixed-effect or variance component terms that are insignificant or overparametrizing the model). Perhaps a GLM could also be run initially to test for the significance of the interaction terms in your fixed-effects. Additionally, maybe the frequency of certain pairs of covariates is too small to give a reasonable estimate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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