我使用lme4运行负二项式glmer。我收到一些错误,我可以看到其他人过去曾经遇到的错误,但我无法解决如何将这些解决方案应用到我自己的模型中。
错误如下:
Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, ...:
Model failed to converge with max|grad| = 0.00827217 (tol = 0.001, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, ... :
Model is nearly unidentifiable: very large eigenvalue
- Rescale variables?
我已将数据包含在下方的可重复代码中:
abglmm.nb<-glmer.nb(Ab~Treatment*Struc+(1|Site),data=y)
y<-structure(list(Site = structure(c(3L, 3L, 3L, 2L, 2L, 2L, 1L,
1L, 1L, 3L, 3L, 3L, 2L, 2L, 2L, 1L, 1L, 1L, 3L, 3L, 3L, 2L, 2L,
2L, 1L, 1L, 1L, 3L, 3L, 3L, 2L, 2L, 2L, 1L, 1L, 1L), .Label = c("Gar",
"Ing", "Mal"), class = "factor"), Treatment = structure(c(4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L), .Label = c("Cag", "Hshg", "Lshg", "Nog"), class = "factor"),
Struc = c(72.28753968, 70.31960317, 57.22154762, 43.36305556,
55.09400794, 48.89420635, 68.52, 75.9256746, 65.8225, 43.45376984,
52.08833333, 30.52218254, 23.37588999, 21.27666667, 17.72349206,
26.48095238, 32.26884921, 40.57555556, 19.39702381, 15.24972222,
13.3684127, 32.06484127, 31.15543651, 31.92099206, 37.10579365,
39.91400794, 56.26515873, 11.0725, 15.39166667, 14.11166667,
20.03650794, 18.80099206, 21.7102381, 17.47722222, 15.18083333,
12.2865873), Ab = c(393L, 554L, 317L, 249L, 455L, 371L, 488L,
353L, 544L, 393L, 443L, 475L, 608L, 715L, 583L, 650L, 433L,
428L, 447L, 402L, 411L, 541L, 692L, 632L, 589L, 564L, 569L,
457L, 386L, 527L, 251L, 454L, 471L, 394L, 231L, 378L)), .Names = c("Site",
"Treatment", "Struc", "Ab"), class = "data.frame", row.names = c("BU1",
"BU2", "BU3", "JU1", "JU2", "JU3", "GU1", "GU2", "GU3", "KC1",
"KC2", "KC3", "HC1", "HC2", "HC3", "GC1", "GC2", "GC3", "OL1",
"OL2", "OL3", "ML1", "ML2", "ML3", "GL1", "GL2", "GL3", "TH1",
"TH2", "TH3", "KH1", "KH2", "KH3", "GH1", "GH2", "GH3"))
非常感谢任何帮助。