我有一个全局moel,有两个平滑的项和两个随机效果。
mRI_qb <- gam(ri ~ SE_score + s(deg, k=7) + s(gs, k=7) + TL + species + sex + season + year +
s(code, bs = 're') + s(station, bs = 're'),
family=quasibinomial(), data=node_dat, na.action = "na.fail")我在MuMIn上运行了dredge函数,速度非常慢,即使使用pdredge函数也是如此。
# RI dredge very slow so using parallel processing
library (parallel)
library (snow)
#make cluster - use 5 because have 6 cores, need one for other tasks
mycluster = makeCluster(5, type = "SOCK") ## also need snow installed
#data must exported to the cluster - see 'details' https://rdrr.io/cran/MuMIn/man/pdredge.html
clusterExport(mycluster,"node_dat")
#required packages must be also loaded there
clusterEvalQ(mycluster, library(mgcv))
RI_dredge <- MuMIn::pdredge(mRI_qb, mycluster)然而,8天后,它终于完成了。然而,我只有logLik、AICc、delta和weight列的NAs。

我似乎找不到为什么疏导器会为这些列输出NAs,特别是在模型运行得很好而没有错误的情况下。
数据集的副本可在here中找到
发布于 2021-07-25 19:26:36
这是因为您使用的是quasibinomial系列,它不提供对数似然,因此无法计算AIC。您可以尝试使用bam而不是gam,因为这是一个非常大的数据集。
https://stackoverflow.com/questions/68497297
复制相似问题