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

Ben Bolker bbolker at gmail.com
Mon Mar 7 02:55:58 CET 2016


  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