我遇到了与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包作为对交互因子应用事后测试的方法。
在此之前,我使用glmer,在之前的R版本中,至少在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”)中,选择$ par,ctrl = control $ checkConv,:
模型无法与max | grad |收敛= 0.00436052(tol = 0.001)
我按照Ben Bolker的指示(对dmartin的回应)试图改装
对照= glmerControl(优化= “bobyqa”)
但
警告信息:
1:在checkConv(attr(opt,“derivs”)中,opt $ par,ctrl = control $ checkConv,:
模型无法与max | grad |收敛= 52.2329(tol = 0.001)
2:在checkConv(attr(opt,“derivs”)中,opt $ par,ctrl = control $ checkConv ,:
模型未能收敛:使用1个负特征值退化Hessian
任何想法 - 请?
谢谢!