1

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]]) ))
www
  • 38,575
  • 12
  • 48
  • 84
Joe
  • 347
  • 5
  • 20
  • You need to provide additional information (e.g., what is your full model, how do you call `dredge`, ...). Right now I can only say that an integer overflow occured and it's probably not related to your data. – Roland Mar 13 '15 at 08:31
  • sure, now included. I get the same error with or without the _extra_ argument – Joe Mar 13 '15 at 12:30
  • more info on this....dredge runs to about 77% complete before it pops up the error – Joe Mar 21 '15 at 23:26

1 Answers1

2

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.

MathieuF
  • 3,130
  • 5
  • 31
  • 34
  • You can see in the error message that it prints error and it really stops, so this is not answer at all - should have been posted only as a comment to the question. – Marki555 Jul 08 '15 at 14:24
  • I also get the `Fixed term is "(Intercept)"` message but it appears to have run and returns the model selection table. – rrr Dec 04 '22 at 20:18