I get a strange error like this one Strange error with Dredge: MuMIn under some cases of using dredge() or pdredge() in the MuMIn package.
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
This error occurs when the global model includes 31 different terms (main effect of environment, main effect of 5 genes, 5 gene-environment interactions, 10 gene-gene interactions, and 10 gene-gene-environment interactions). 31 is the maximum number of terms allowed for dredge().
The error kills the process after about 30 hours, which is probably nearly complete. When the global effect is reduced to 15 terms (main effect of 5 genes, 10 gene-gene interactions) there is no error. My data set does not have any missing data.
Does anyone know what this error means or how to resolve it?
This was my script:
# Full model has 31 terms
Full <- lm(DTH ~ Environment + PpdD1 + PpdB1 + PpdA1 + RhtB1 + RhtD1 +
PpdD1:PpdB1 + PpdD1:PpdA1 + PpdD1:RhtB1 + PpdD1:RhtD1 + PpdB1:PpdA1 +
PpdB1:RhtB1 + PpdB1:RhtD1 + PpdA1:RhtB1 + PpdA1:RhtD1 + RhtB1:RhtD1 +
PpdD1*PpdB1*Environment + PpdD1*PpdA1*Environment + PpdD1*RhtB1*Environment +
PpdD1*RhtD1*Environment + PpdB1*PpdA1*Environment + PpdB1*RhtB1*Environment +
PpdB1*RhtD1*Environment + PpdA1*RhtB1*Environment + PpdA1*RhtD1*Environment +
RhtB1*RhtD1*Environment, data=data)
# Model selection using MuMIN package
options(na.action = "na.fail")
AllModels <- dredge(Full, rank="AIC") # Not run in parallel
AllModels