我想为响应变量的某些解释变量(称为HUNTED)生成置信区间的值。数据约为3个不同的时间周期。 但是,当我使用代码时: 图书馆(MASS) confint(allspecies4) 我只收到错误消息(见下文)。有谁知道如何改善我的脚本,以便我可以进入置信区间? 观察:我的数据集太大了,我只添加了一部分,以便您了解其分布情况。
allspecies4<-read.csv(file= "dadosGLMM.csv", header= TRUE, sep= ";" )
attach(allspecies4)
library(lme4)
allspecies4<- glmer(HUNTED~ eco+TrophicLevel+age+ log(body_mass)+
habitat+ABUND + PERIOD + tabu +(1|Specie),
data=dadosGLMM, family=binomial)
library(MASS)
confint(allspecies4)
library(MASS)
> confint(allspecies4)
Computing profile confidence intervals ...
Error in zeta(shiftpar, start = opt[seqpar1][-w]) :
profiling detected new, lower deviance
In addition: Warning messages:
1: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
2: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
3: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
4: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
5: In (function (fn, par, lower = rep.int(-Inf, n), upper = rep.int(Inf, :
failure to converge in 10000 evaluations
6: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
7: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
8: In nextpar(mat, cc, i, delta, lowcut, upcut) :
unexpected decrease in profile: using minstep
9: In FUN(X[[i]], ...) : non-monotonic profile for (Intercept)
样本数据
Specie body_mass TrophicLevel age eco habitat PERIOD HUNTED ABUND tabu
Cerc_mit 3.70 2 57 2 F DURING 0 2 1
Cerc_mit 3.70 2 57 2 F AFTER 0 3 1
Cerc_mit 3.70 2 57 2 F BEFORE 0 4 1
Cerc_mit 3.70 2 67 2 F DURING 1 2 1
Cerc_mit 3.70 2 67 2 F AFTER 0 2 1
Chlor_cyn 3.70 2 53 2 S DURING 0 3 0
Chlor_cyn 3.70 2 74 2 S DURING 0 3 0
Chlor_cyn 3.70 2 30 2 S DURING 0 4 0
Chlor_cyn 3.70 2 63 2 S DURING 0 4 0
Chlor_cyn 3.70 2 54 2 S DURING 0 3 0
Chlor_cyn 3.70 2 30 2 S DURING 0 4 0
Chlor_cyn 3.70 2 30 2 S DURING 0 3 0
Phil_mont 3.69 2 24 3 F DURING 0 3 0
Phil_mont 3.69 2 24 3 F BEFORE 0 4 0
Phil_mont 3.69 2 33 3 F AFTER 1 4 0
Phil_mont 3.69 2 33 3 F BEFORE 0 4 0
Phil_mont 3.69 2 33 3 F DURING 0 4 0
Phil_mont 3.69 2 43 3 F BEFORE 0 4 0
Phil_mont 3.69 2 43 3 F DURING 0 4 0