1

I am having the same problem as previous post from dmartin but the solution presented has not being working to my dataset.

trying to fit:

model<-glmer(nb~habitat*stigmatype+(1|sitecode/stigmaspecies),
             family=Gamma(link=log))

Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  : 
Model failed to converge with max|grad| = 0.00436052 (tol = 0.001)

I uploaded my R version to R-3.1.0 for Windows (32/64 bit) in order to run glmmADB package as a way to apply a post hoc test on the interaction factors.

Before that, I was using glmer, in previous R version which was working fine for at least the glmer, which gave me the following output:

> summary(nbnew)
Generalized linear mixed model fit by maximum likelihood ['glmerMod']
Family: Gamma ( log )
Formula: n ~ habitat * stigmatype + (1 | sitecode/stigmaspecies)

 AIC       BIC    logLik  deviance  
3030.101  3066.737 -1506.050  3012.101  

Random effects:
 Groups                 Name        Variance  Std.Dev.  
 stigmaspecies:sitecode (Intercept) 5.209e+00 2.2822436 
 sitecode               (Intercept) 2.498e-07 0.0004998 
 Residual                           2.070e+00 1.4388273
Number of obs: 433, groups: stigmaspecies:sitecode, 109; sitecode, 20

Fixed effects: 
                                     Estimate Std. Error t value Pr(>|z|)     
(Intercept)                            2.3824     0.4080   5.839 5.26e-09 ***  
habitatnon-invaded                    -1.8270     0.6425  -2.843  0.00446 **   
stigmatypesemidry                     -1.7531     0.7573  -2.315  0.02061 *    
stigmatypewet                         -1.7210     0.8944  -1.924  0.05434 .    
habitatnon-invaded:stigmatypesemidry   2.0774     1.1440   1.816  0.06938 .    
habitatnon-invaded:stigmatypewet       1.3120     1.4741   0.890  0.37346      
---  
`Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 `

Correlation of Fixed Effects:  
                 (Intr) hbttn- stgmtyps stgmtypw hbttnn-nvdd:stgmtyps`  
hbttnn-nvdd          -0.635                                         
stgmtypsmdr          -0.539  0.342                                       
stigmatypwt          -0.456  0.290  0.246                                
hbttnn-nvdd:stgmtyps  0.357 -0.562 -0.662   -0.163                       
hbttnn-nvdd:stgmtypw  0.277 -0.436 -0.149   -0.607    0.245        

Since I am interested in difference between each level of habitat and stigma type as well as on the interactions, I applied ghlt from multicomp:

model<-glmer(log(nb+1)~habitat*stigmatype+
              (1|sitecode/stigmaspecies),     
              family=Gamma(link=log))
av<-anova(model)`

nb.habstigma<-interaction(nb$habitat, nb$stigmatype,drop=T)

m1<-glmer(nbnb.habstigma+(1|sitecode/stigmaspecies),family=Gamma(link=log))

stigmatest<-glht(m1, linfct = mcp(nb.habstigma = "Tukey"))

and:
Error: pwrssUpdate did not converge in (30) iterations

from here, I switched to R latest version to install glmmADMB, and got the message:
Warning message: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.00436052 (tol = 0.001)

I followed the instructions from Ben Bolker (response to dmartin) trying to refit with
control=glmerControl(optimizer="bobyqa") but
Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge with max|grad| = 52.2329 (tol = 0.001) 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 1 negative eigenvalues

Any ideas- please??

Thank you!

Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
Carine
  • 31
  • 1
  • 1
  • 6
  • A few thoughts/questions: you should distinguish between *warnings* and *errors*. The first set of warnings you're getting are quite likely to be false positives, to be fixed soon. It's a little puzzling what installing/loading `glmmADMB` is doing, since you're not using any functions from the package. Can you give a reproducible example?? – Ben Bolker Apr 18 '14 at 04:21
  • After installing R3.1.0 to run glmmADMB in the same dataset: Error in glmmadmb(meanpollen ~ habitat * stigmatype + (1 | sitecode/stigmaspecies),: The function maximizer failed (couldn't find STD file) Troubleshooting steps include (1) run with 'save.dir' set and inspect output files; (2) change run parameters: see '?admbControl'. In addition: Warning message:running command 'C:\WINDOWS\system32\cmd.exe/c\\ads.bris.ac.uk/filestore/MyFiles/Students/bzxce/R-3.1.0/library/glmmADMB/bin/windows32/glmmadmb.exe" -maxfn 500 -maxph 5 -noinit -shess' had status 1. So, tried to fit glmer – Carine Apr 18 '14 at 15:56
  • Warning message: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge with max|grad| = 9.77697 (tol = 0.001), with correlation of fixed effects full of zeros, and weird results from Pr(>|z|). not sure how i can make a reproducible example of this, and have no idea why running glmmadmb would affect glmm, or if is a R3.1.0 problem... but the structure of my data and model are exactly the same from previous version where glmer was working. Thanks for your time! – Carine Apr 18 '14 at 15:56
  • If you can't make a reproducible example (or send me your data), it's going to be very hard indeed to sort out the problem. Can you specify which two versions of `lme4` you are referring to? – Ben Bolker Apr 19 '14 at 14:40
  • I sent the data to your email, if that is ok? The versions are lme4_1.1-6 and glmmADMB_0.7.7, on R version 3.1.0 (2014-04-10) -- "Spring Dance". And lme4_1.0-4 when running R 2.15.1 (2012-06-22) -- "Roasted Marshmallows". thanks a lot! :) – Carine Apr 21 '14 at 08:23
  • @BenBolker also having some issues with the following two warnings: `Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge with max|grad| = 0.0199047 (tol = 0.001) 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model is nearly unidentifiable: very large eigenvalue - Rescale variables? ` Having googled them I have the discussion about False positives etc. Would be interested to know what the current state is, I find them a bit obscure for my level of knowledge. – user1320502 May 22 '14 at 09:37
  • As both are warnings I did not receive using the same code before updating to R 3.1.0 and lme4_1.1-6 – user1320502 May 22 '14 at 09:47

0 Answers0