[英]Errors with dredge() function in MuMin
I'm trying to use the dredge() function to evaluate models by completing every combination of variables (up to five variables per model) and comparing models using AIC corrected for small sample size (AICc).我正在尝试使用 dredge() function 通过完成变量的每个组合(每个模型最多五个变量)并使用针对小样本量(AICc)校正的 AIC 比较模型来评估模型。
However, I'm presented with one error and two warning messages as follows:但是,我收到一个错误和两个警告消息,如下所示:
Fixed term is "(Intercept)" Warning messages: 1: In dredge(MaxN.model, m.min = 2, m.max = 5): comparing models fitted by REML 2: In dredge(MaxN.model, m.min = 2, m.max = 5): arguments 'm.min' and 'm.max' are deprecated, use 'm.lim' instead
固定术语是“(拦截)”警告消息:1:在挖泥机中(MaxN.model,m.min = 2,m.max = 5):比较由 REML 拟合的模型 2:在挖泥机中(MaxN.model,m.min = 2, m.max = 5): arguments 'm.min' 和 'm.max' 已弃用,请改用 'm.lim'
I've tried changing to 'm.lim' as specified but it comes up with the error:我尝试按照指定更改为“m.lim”,但出现错误:
Error in dredge(MaxN.model, m.lim = 5): invalid 'm.lim' value In addition: Warning message: In dredge(MaxN.model, m.lim = 5): comparing models fitted by REML
疏浚错误(MaxN.model,m.lim = 5):无效的“m.lim”值另外:警告消息:在疏浚中(MaxN.model,m.lim = 5):比较由 REML 拟合的模型
The code I'm using is:我正在使用的代码是:
MaxN.model<-lme(T_MaxN~Seagrass.cover+composition.pca1+composition.pca2+Sg.Richness+traits.pca1+
land.use.pc1+land.use.pc2+seascape.pc2+D.landing.site+T_Depth,
random=~1|site, data = sgdf, na.action = na.fail, method = "REML")
Dd_MaxN<-dredge(MaxN.model, m.min = 2 , m.max = 5)
What am I doing wrong?我究竟做错了什么?
m.lim
.m.lim
指定什么。 ?dredge
says: ?dredge
说:m.lim...optionally, the limits 'c(lower, upper)' for number of terms in a single model
m.lim ...(可选)单个 model 中术语数量的限制“c(下,上)”
so you should specify a two-element numeric (integer) vector.所以你应该指定一个二元素数值(整数)向量。
method="ML"
rather than method="REML"
.method="ML"
而不是method="REML"
。 The warning/error about REML is very serious; So you should try:所以你应该尝试:
MaxN.model <- lme(..., method = "ML") ## where ... is the rest of your fit
Dd_MaxN <- dredge(MaxN.model, m.lim=c(2,5))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.