0
$\begingroup$

I'm working on a logistic regression analysis using the lme4 package and function glmer. I built the following model:

results<-glmer(R0A1~MP_Scaled*Season1+MPHW_Scaled*Season1+HW_Scaled*Season1+YP_Scaled*Season1+AG_Scaled*Season1+Shrub_Scaled*Season1+(1|ID)+(1|Site),data=animals,family=binomial)

MP_Scaled, MPHW_Scaled, etc. are continuous variables and Season1 is a categorical variable. My approach is to understand whether the selection of certain habitat types differs across seasons A,B, and C.

I received the following output/message:

enter image description here

I've re-scaled the continuous variables by dividing each linear distance (m) by 100-m. I ran this same analysis in SAS and the model converged. Is there a way to change the convergence criteria in the glmer model? In SAS, my model is specified as the following:

PROC GLIMMIX DATA=STUDYAREA;

CLASS ID SITE SEASON1; MODEL R0A1 = MP_SCALED|SEASON1 MPHW_SCALED|SEASON1 HW_SCALED|SEASON1 YP_SCALED|SEASON1 AG_SCALED|SEASON1 SHRUB_SCALED|SEASON1 / DIST=BINOMIAL LINK=LOGIT SOLUTION ODDSRATIO; RANDOM ID / TYPE = VC; RANDOM SITE / TYPE = VC; NLOPTIONS GCONV=0; RUN;

The NLOPTIONS GCONV=0 is used to continue the estimation until the max gradient is sufficiently small, which is done by setting the GCONV=0. Thanks for the assistance!

$\endgroup$
2
  • 3
    $\begingroup$ This post is practically unreadable without formatting--the system is misinterpreting some of the special characters. Please edit it and use the tools above the textbox to format code and error messages. $\endgroup$
    – whuber
    Jul 27 '15 at 22:13
  • $\begingroup$ @whuber, does that work? Sorry for the issues in posting earlier. I can't seem to find an easy way to post my R code/output without issues in formatting. $\endgroup$
    – Buck2079
    Jul 27 '15 at 22:30
1
$\begingroup$

You can easily change the convergence criteria, e.g.

     glmerControl(...,
        check.conv.grad = .makeCC("warning", tol = 1e-2))

or change the optimization parameters via the optCtrl argument, although this is a bit obscure for the bobyqa optimizer (help("bobyqa",package="minqa")). Check help("convergence",package="lme4") for more information about convergence, among other things the fact that

(2) the magnitude of the scaled gradient increases with sample size, so that warnings will occur even for apparently well-behaved fits with large data sets.

If you get similar answers from lme4 and PROC GLIMMIX I would conclude that the warning is a false positive.

$\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.