我正在进行一项关于将成功和失败的分数(我称之为C)添加到混合效应逻辑回归中的影响的模拟研究。我模拟了2000个数据集,并用5个逻辑回归建模(添加了1,.5,.25,.1和.05的C)。这些模型聚合在大多数数据集上,但当我添加.25时,~200未能收敛,当我添加.5时,~50无法收敛(有时我得到一条警告信息,有时候我得到难以置信的标准错误)。我很少看到任何与其他值不一致的证据(我已经看过警告信息,标准误差以及随机效应矩阵中最高与最低特征值的比率)。即使在C = .25时未能收敛的数据集中,稍微改变C通常也能解决问题,例如在此示例中(此处提供的数据集:https://www.dropbox.com/sh/ro92mtjkpqwlnws/AADSVzcNvl0nnnzCEF5QGM6qa?oref=e&n=19939135)
m7 <- glmer(cbind(Data + .25, (10+.5- (Data + .25))) ~ Group*Condition + (1 + Condition |ID), family="binomial", data=df2)
Warning messages:
1: In eval(expr, envir, enclos) : non-integer counts in a binomial glm!
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
summary(m7)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: cbind(Data + 0.25, (10 + 0.5 - (Data + 0.25))) ~ Group * Condition + (1 + Condition | ID)
Data: df2
AIC BIC logLik deviance df.resid
7001.1 7040.0 -3493.6 6987.1 1913
Scaled residuals:
Min 1Q Median 3Q Max
-3.5444 -0.6387 0.0143 0.6945 2.9802
Random effects:
Groups Name Variance Std.Dev. Corr
ID (Intercept) 0.26598 0.5157
Condition 0.06413 0.2532 0.66
Number of obs: 1920, groups: ID, 120
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.760461 0.001226 1436.5 <2e-16 ***
Group -1.816952 0.001225 -1483.0 <2e-16 ***
Condition -0.383383 0.001226 -312.7 <2e-16 ***
Group:Condition -0.567517 0.001225 -463.2 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Group Condtn
Group 0.000
Condition 0.000 0.000
Group:Cndtn 0.000 0.000 0.000
m8 <- glmer(cbind(Data + .2, (10+.4- (Data + .2))) ~ Group*Condition + (1 + Condition |ID), family="binomial", data=df2)
Warning message:
In eval(expr, envir, enclos) : non-integer counts in a binomial glm!
summary(m8)
Generalized linear mixed model fit by maximum likelihood (Laplace Approximation) ['glmerMod']
Family: binomial ( logit )
Formula: cbind(Data + 0.2, (10 + 0.4 - (Data + 0.2))) ~ Group * Condition + (1 + Condition | ID)
Data: df2
AIC BIC logLik deviance df.resid
6929.3 6968.2 -3457.6 6915.3 1913
Scaled residuals:
Min 1Q Median 3Q Max
-3.5724 -0.6329 0.0158 0.6945 2.9976
Random effects:
Groups Name Variance Std.Dev. Corr
ID (Intercept) 0.2698 0.5194
Condition 0.0652 0.2553 0.66
Number of obs: 1920, groups: ID, 120
Fixed effects:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.76065 0.07850 22.429 < 2e-16 ***
Group -1.81762 0.10734 -16.933 < 2e-16 ***
Condition -0.38111 0.06377 -5.977 2.28e-09 ***
Group:Condition -0.57033 0.08523 -6.692 2.21e-11 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Correlation of Fixed Effects:
(Intr) Group Condtn
Group -0.732
Condition -0.033 0.025
Group:Cndtn 0.029 0.045 -0.758
由于这是一项模拟研究,我对使这些模型收敛并不是特别感兴趣,但我想了解为什么它们没有收敛。有人有什么想法吗?