我想知道是否有人可以帮助我从疏浚包的任务中解决此错误:
Fixed term is "(Intercept)"
|============================================================================
63%
Error in while ((iComb <- iComb + 1L) < ncomb) { :
missing value where TRUE/FALSE needed
In addition: Warning message:
In iComb + 1L : NAs produced by integer overflow
Timing stopped at: 90799.82 18.545 90796.9
>
我看到它可能与我的 TRUE/FALSE 子集矩阵有关,但我已经仔细检查以确保矩阵包含通过调用 getAllTerms 函数返回的所有项。
这就是我如何称呼dredre
#exclude only pairs of variables having cor. coefficient r > 0.2
smat <- abs(cor(predictors)) <= .2
smat[!lower.tri(smat)] <- NA
#set global model
forml<-glm(SEVERITY_CODE ~(autocorr+CummDHM_retro + CummDHM_sat + DHM_retro_cnt + DHM_sat_cnt + diff_events_all + diff_events_periodmax + duration_events_neg + duration_events_pos + events_neg_all + events_neg_periodmax + events_pos_all + events_pos_periodmax + maxpower_events_neg + maxpower_events_neg_norm + maxpower_events_pos + maxpower_events_pos_norm + maxpower_neg + maxpower_neg_norm + maxpower_pos + maxpower_pos_norm + NSE + pct_coi_periodmax + pct_ispos_signif + pct_seasonal + pct_signif_periodmax + period_events_neg + period_events_pos + period_max + var_seasonal + varSST ), family=binomial(link=logit), data=all.data)
options(na.action = "na.fail")
system.time(modelmix <- dredge(forml, subset = smat, trace=2, evaluate=FALSE, extra = c("R^2", F = function(x)
summary(x)$fstatistic[[1]]) ))