运行这个glmer.nb
,我收到了错误信息
边界(奇异)拟合:参见 ?isSingular
警告消息:在 theta.ml(Y, mu, weights = object@resp$weights, limit = limit, : 达到迭代限制
我跑了singular(model)
,它又回来了TRUE
。然后我跑了summary(model)
,它显示了警告信息
警告消息:1:在 vcov.merMod(object, use.hessian = use.hessian) 中:从有限差分 Hessian 计算的方差-协方差矩阵不是正定的或包含 NA 值:回退到从 RX 2 估计的 var-cov :在 vcov.merMod(object, correlation = correlation, sigm = sig) 中:从有限差分 Hessian 计算的方差-协方差矩阵不是正定的或包含 NA 值:回退到从 RX 估计的 var-cov
我抬头一看,似乎警告消息表明模型不准确。但我不确定我能做些什么来解决这个警告。我将非常感谢任何帮助!
model <- glmer.nb(Level ~ var1+var2+var3+var4+var5+var6+(1|ID),data = df)
summary(model)
df<-structure(list(ID = c("A", "B", "C", "D", "E", "F", "G", "H",
"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
"V", "W", "X"), var1 = c(0, 0, 1, 2, 0, 0, 0, 0, 0, 0, 1, 0,
1, 1, 0, 2, 0, 0, 0, 0, 3, 0, 0, 5), var2 = c(0, 2, 2, 1, 1,
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 3, 1, 0, 0), var3 = c(0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0), var4 = c(0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0), var5 = c(0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), var6 = c(0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0), Level = c(1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0,
1, 0, 1, 0, 1, 1, 0, 1, 0)), row.names = c(NA, -24L), class = "data.frame")