Dredge on unmarked occupancy model(R MuMIn)
Dredge on an unmarked occupancy model (R MuMIn)
我正在疏通一个未标记的占用模型并且 运行 遇到了一些障碍:
1)首先疏通了模型的检测部分后,我尝试用之前为检测部分选择的预测变量的固定子集疏通模型的占用部分,如下:
global_occ <-occu( ~ Freq + I(Freq^2) + n +mean_tree_d9 + mean_tree_kurt ~ C1 + C2 + C3 + C4 + S1 + S2 + S3 + S4 + Hour + I(Hour^2) + Deg_class + Freq_fire + age + Freq + mean_tree_d9 + mean_tree_d4 + mean_tree_d2 + mean_shrub_stdev + mean_tree_kurt + mean_tree_mad, umf_all)
system.time(dredge_occ<-pdredge(global_occ, rank=AIC, m.max=5, cluster=clust, fixed=`p(Freq)`&`p(I(Freq^2))`&`p(n)`&`p(mean_tree_d9)`&`p(mean_tree_kurt)`))
> dredge_occ
Global model call: occu(formula = ~Freq + I(Freq^2) + n + mean_tree_d9 + mean_tree_kurt ~
C1 + C2 + C3 + C4 + S1 + S2 + S3 + S4 + Hour + I(Hour^2) +
Deg_class + Freq_fire + age + Freq + mean_tree_d9 + mean_tree_d4 +
mean_tree_d2 + mean_shrub_stdev + mean_tree_kurt + mean_tree_mad, data = umf_all)
---
Model selection table
p(Int) psi(Int) p(Frq) p(I(Frq^2)) p(men_tre_d9) p(men_tre_krt) p(n) df logLik AIC delta weight
31 -8.68 -1.93 -8.518 -2.439 -0.2369 -0.2295 0.07039 7 -9664.791 19343.6 0 1
Models ranked by AIC(x)
更新:我尝试使用下面的 Kamil 解决方案,但它没有用,因为 "m.max" 参数对任何单个模型的最大变量数施加了通用约束(跨越 p 和 psi 组件)因此不允许安装任何 psi 协变量...
?dredge
说:fixed
是 "either a single sided formula
or a character vector giving names of terms"。在您的情况下,它是一个表达式(适合作为 subset
参数)。因此,您的代码应为:
pdredge(global_occ, rank=AIC, m.max=5, cluster=clust, fixed=c("p(Freq)", "p(I(Freq^2))", "p(n)", "p(mean_tree_d9)", "p(mean_tree_kurt)"))
我正在疏通一个未标记的占用模型并且 运行 遇到了一些障碍:
1)首先疏通了模型的检测部分后,我尝试用之前为检测部分选择的预测变量的固定子集疏通模型的占用部分,如下:
global_occ <-occu( ~ Freq + I(Freq^2) + n +mean_tree_d9 + mean_tree_kurt ~ C1 + C2 + C3 + C4 + S1 + S2 + S3 + S4 + Hour + I(Hour^2) + Deg_class + Freq_fire + age + Freq + mean_tree_d9 + mean_tree_d4 + mean_tree_d2 + mean_shrub_stdev + mean_tree_kurt + mean_tree_mad, umf_all)
system.time(dredge_occ<-pdredge(global_occ, rank=AIC, m.max=5, cluster=clust, fixed=`p(Freq)`&`p(I(Freq^2))`&`p(n)`&`p(mean_tree_d9)`&`p(mean_tree_kurt)`))
> dredge_occ
Global model call: occu(formula = ~Freq + I(Freq^2) + n + mean_tree_d9 + mean_tree_kurt ~
C1 + C2 + C3 + C4 + S1 + S2 + S3 + S4 + Hour + I(Hour^2) +
Deg_class + Freq_fire + age + Freq + mean_tree_d9 + mean_tree_d4 +
mean_tree_d2 + mean_shrub_stdev + mean_tree_kurt + mean_tree_mad, data = umf_all)
---
Model selection table
p(Int) psi(Int) p(Frq) p(I(Frq^2)) p(men_tre_d9) p(men_tre_krt) p(n) df logLik AIC delta weight
31 -8.68 -1.93 -8.518 -2.439 -0.2369 -0.2295 0.07039 7 -9664.791 19343.6 0 1
Models ranked by AIC(x)
更新:我尝试使用下面的 Kamil 解决方案,但它没有用,因为 "m.max" 参数对任何单个模型的最大变量数施加了通用约束(跨越 p 和 psi 组件)因此不允许安装任何 psi 协变量...
?dredge
说:fixed
是 "either a single sided formula
or a character vector giving names of terms"。在您的情况下,它是一个表达式(适合作为 subset
参数)。因此,您的代码应为:
pdredge(global_occ, rank=AIC, m.max=5, cluster=clust, fixed=c("p(Freq)", "p(I(Freq^2))", "p(n)", "p(mean_tree_d9)", "p(mean_tree_kurt)"))