Strange error with Dredge: MuMIn

半城伤御伤魂 提交于 2019-12-24 12:32:07

问题


I am wondering whether anyone could help me trouble shoot this error from a task with dredge package:

   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 
> 

I see that it probably has to do with my TRUE/FALSE subset matrix but I have double checked to make sure the matrix contains all terms returned by calling getAllTerms function.

Here is how I am calling 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]]) ))

回答1:


I don't think that "Fixed term is "(Intercept)"" is actually an error message. You just have to be patient as dredge runs through all model combinations. I had this same message pop up when I used dredge, but it still appeared to work.



来源:https://stackoverflow.com/questions/29026042/strange-error-with-dredge-mumin

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!