[R-sig-ME] Failure to converge with glmer on gamma data

Ben Bolker bbolker at gmail.com
Mon Mar 7 22:40:23 CET 2016


  I think you've got this backwards:  FALSE means that the model
*isn't* singular (please re-read the docs, and if you think they're
unclear or wrong, post an issue at
http://github.com/lme4/lme4/issues).  So your model doesn't have that
particular problem.  (It's also fairly easy to identify singularity
for models with only scalar or 2-dimensional random effects -- just
look for zero variances or +/- 1 correlations.)


On Mon, Mar 7, 2016 at 1:53 AM, moses selebatso <selebatsom at yahoo.co.uk> wrote:
> Thank you for the response. I have just gone through the convergence manual
> in lme4 February 2016. I ran the singularity test and this is the result
>
>> diag.vals <- getME(model,"theta")[getME(model,"lower") == 0]
>> any(diag.vals < 1e-6) # FALSE
> [1] FALSE
>
> My interpretation is that there is one (1) diagonal element that is zero or
> very small. Is that correct? If so, the manual says then "...the convergence
> testing methods may be inappropriate.." I do not know what this means
> exactly. Does it mean I should not use the test or there is not need to do
> tests, and so accept the model?
>
> Thank you for your support and patience.
>
> ,
> Moses SELEBATSO
> Home:    (+267) 318 5219 (H)
>  Mobile:  (+267) 716 39370  or  (+267) 738 39370
>
>
> On Monday, 7 March 2016, 3:55, Ben Bolker <bbolker at gmail.com> wrote:
>
>
>
>   Short answers:
>
> (1) the decision whether to use a log or an inverse link function is
> at root a scientific one (i.e., is one functional form or the other
> more sensible for your problem?), although it is generally the case
> that log links are more stable.  You could also use AIC or
> log-likelihood to choose among links if you wanted.
> (2) I would say that 0.0025 is *probably* acceptable, although it
> would be best to try a different optimizer and see if you get similar
> results; have you read the ?convergence manual page?
>
> On Sun, Mar 6, 2016 at 4:43 PM, moses selebatso <selebatsom at yahoo.co.uk>
> wrote:
>> Hello
>> I m trying to determine the effects of season and habitat on forage
>> protein content. With my replica nested within location.
>> model<-glmer(Protein~Habitat*Season + (1|Location/Replica), family=Gamma)
>> I am getting a warning when running my model. I have tried read on
>> previous post and most of the time I get lost because I fairly new to R. I
>> understand there is a maximum "maxlgradl" of 0.001 that should be accepted
>> in this kind of warnings. However, mine is a little higher than that. Can
>> someone advise how I can proceed here and get an acceptable output.
>> I also tried using "....family =Gamma(log)"  instead of just "....family =
>> Gamma" and it doesn't give me the warning. Can this be an acceptable option?
>> Model and output below. I can provide data sample if needed.
>>> model<-glmer(Protein~Habitat*Season + (1|Location/Replica), family=Gamma)
>> Warning message:
>> In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>>  Model failed to converge with max|grad| = 0.00123611 (tol = 0.001,
>> component 1)
>>> model2<-glmer(Protein~Habitat+Season + (1|Location/Replica),
>>> family=Gamma)
>> Warning message:
>> In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
>>  Model failed to converge with max|grad| = 0.00254076 (tol = 0.001,
>> component 1)
>>
>>
>>  Thank you
>>
>> Moses SELEBATSO Home:    (+267) 318 5219 (H)  Mobile:  (+267) 716 39370
>> or  (+267) 738 39370
>
>



More information about the R-sig-mixed-models mailing list