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

moses selebatso selebatsom at yahoo.co.uk
Mon Mar 7 07:53:30 CET 2016


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

 
  
	[[alternative HTML version deleted]]



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