我对其中一个模型有一点收敛性问题,数据存放在文件中:https://mon-partage.fr/f/06LTiBGt/ 。为了解释这些数据,需要知道前若虫的形成是否受到不同形态的影响。 obs柱对应于形成/未形成的若虫。日变量在模型中非常重要。我想至少使用hive变量作为随机效果。 我试图在函数中添加bobyqa控件,但收敛问题仍然存在并遵循?收敛。但是所有人选择融合C
我能否认为这是假阳性?
提前谢谢你,
library("lme4", lib.loc="~/R/win-library/3.3")
> glmpn<-glmer(Obs~moda*jour+1|ruch)+1|code_test),data=dataall_pn,family=binomial(logit),glmerControl(optimizer="bobyqa"))
Warning message:
In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge with max|grad| = 0.0054486 (tol = 0.001, component 1)
> summary(glmpn)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: Obs ~ moda * jour + (1 | ruch) + (1 | code_test)
Data: dataall_pn
Control: glmerControl(optimizer = "bobyqa")
AIC BIC logLik deviance df.resid
22477.2 22651.2 -11216.6 22433.2 20072
Scaled residuals:
Min 1Q Median 3Q Max
-8.4511 -0.9370 0.4435 0.6890 1.5559
Random effects:
Groups Name Variance Std.Dev.
ruch (Intercept) 0.2811 0.5302
code_test (Intercept) 0.2475 0.4975
Number of obs: 20094, groups: ruch, 7; code_test, 5
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.47806 0.46287 -7.514 5.73e-14 ***
modaA 0.46866 0.50489 0.928 0.353281
modaL -2.77363 0.75599 -3.669 0.000244 ***
modaLA 2.04869 0.52218 3.923 8.73e-05 ***
modaP 2.19098 0.48984 4.473 7.72e-06 ***
modaB 1.75376 0.49874 3.516 0.000437 ***
modaBP 2.27875 0.52120 4.372 1.23e-05 ***
modaPL 2.01771 0.48696 4.143 3.42e-05 ***
modaBL 1.06337 0.48795 2.179 0.029312 *
modaBLP 1.93218 0.51939 3.720 0.000199 ***
jour 0.41973 0.02981 14.079 < 2e-16 ***
modaA:jour -0.06559 0.04188 -1.566 0.117369
modaL:jour 0.19876 0.06491 3.062 0.002198 **
modaLA:jour -0.22419 0.04267 -5.254 1.49e-07 ***
modaP:jour -0.25363 0.04012 -6.322 2.58e-10 ***
modaB:jour -0.19555 0.04097 -4.773 1.82e-06 ***
modaBP:jour -0.23478 0.04262 -5.509 3.61e-08 ***
modaPL:jour -0.24454 0.03988 -6.131 8.71e-10 ***
modaBL:jour -0.16590 0.04003 -4.145 3.40e-05 ***
modaBLP:jour -0.21726 0.04245 -5.119 3.08e-07 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation matrix not shown by default, as p = 20 > 12.
Use print(x, correlation=TRUE) or
vcov(x) if you need it
convergence code: 0
Model failed to converge with max|grad| = 0.0054486 (tol = 0.001, component 1)