1

我遇到了与 dmartin 上一篇文章相同的问题,但提出的解决方案不适用于我的数据集。

试图适应:

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)

我将我的 R 版本上传到 R-3.1.0 for Windows(32/64 位),以便运行 glmmADB 包作为对交互因素应用事后测试的一种方式。

在此之前,我在以前的 R 版本中使用 glmer,它至少对 glmer 运行良好,它给了我以下输出:

> 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        

由于我对栖息地和污名类型的每个级别之间的差异以及相互作用感兴趣,我ghlt从以下位置申请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"))

并且:
错误:pwrssUpdate 在 (30) 次迭代中没有收敛

从这里,我切换到 R最新版本进行安装glmmADMB,并收到消息:
警告消息:在 checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to blend with max|grad | = 0.00436052 (tol = 0.001)

我按照 Ben Bolker 的说明(对 dmartin 的回应)尝试使用
control=glmerControl(optimizer="bobyqa") 进行改装,但
警告消息:1:在 checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : 模型未能收敛到 max|grad| = 52.2329 (tol = 0.001) 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : 模型未能收敛: 具有 1 个负特征值的退化 Hessian

有什么想法吗?

谢谢!

4

0 回答 0