0

我正在生成装有 lmer 的模型的不同组合global.modprdredge用于执行此操作。这是我的代码:

require(parallel) || require(snow)
clusterType <- if(length(find.package("snow", quiet = TRUE))) "SOCK" else "PSOCK"
clust <- try(makeCluster(getOption("cl.cores", 4), type = clusterType))
clusterEvalQ(clust, library(lme4))
clusterExport(clust, "lmerDat")

model.set <- pdredge(global.mod, clust,
                   subset = 
                   dc(tmax_sum_gt_35, I(tmax_sum_gt_35^2)) && 
                   dc(tmin_sum_gt_22, I(tmin_sum_gt_22^2)) && 
                   dc(r_spell_lt_p05, I(r_spell_lt_p05^2)) &&
                   dc(r_sum_gt_p95, I(r_sum_gt_p95^2)) &&
                   dc(spei6_harvest.end, I(spei6_harvest.end^2)) &&
                   Irrigation,  m.lim = c(2, NA),
                   rank = AIC, extra = "adjR^2", trace = 2)

但是,几秒钟后我的代码会生成以下错误:

Error in rval[k + m, retColIdx] <- qrows[[m]] : 
  number of items to replace is not a multiple of replacement length
4

0 回答 0